Make INumeral json serializable

This commit is contained in:
0x4261756D 2024-02-21 15:06:51 +01:00
parent 25b3dd63c5
commit 424f381755

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace luaaaaah;
class Tokenizer
@ -3734,6 +3735,8 @@ public enum TokenType
StringLiteral,
}
[JsonDerivedType(typeof(Integer), typeDiscriminator: "int")]
[JsonDerivedType(typeof(Float), typeDiscriminator: "float")]
public interface INumeral
{
public class Integer(int value) : INumeral