Make INumeral json serializable
This commit is contained in:
parent
25b3dd63c5
commit
424f381755
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace luaaaaah;
|
namespace luaaaaah;
|
||||||
class Tokenizer
|
class Tokenizer
|
||||||
@ -3734,6 +3735,8 @@ public enum TokenType
|
|||||||
StringLiteral,
|
StringLiteral,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonDerivedType(typeof(Integer), typeDiscriminator: "int")]
|
||||||
|
[JsonDerivedType(typeof(Float), typeDiscriminator: "float")]
|
||||||
public interface INumeral
|
public interface INumeral
|
||||||
{
|
{
|
||||||
public class Integer(int value) : INumeral
|
public class Integer(int value) : INumeral
|
||||||
|
Loading…
x
Reference in New Issue
Block a user