tlang-interperter-cs/tlanglib/TChar.cs

29 lines
577 B
C#

using Newtonsoft.Json.Linq;
namespace tlang
{
public class TChar : TObject
{
public override JToken AsToken()
{
return JValue.FromObject(Value);
}
public static implicit operator char(TChar c)
{
return c.Value;
}
public override bool AsBoolean => Value != '\0';
public char Value {get;set;}
public TChar(char v)
{
Value = v;
}
public override string ToString()
{
return Value.ToString();
}
}
}