tlang-runtime-compiler/TLang.VM/TNumber.cs

18 lines
395 B
C#
Raw Normal View History

2023-07-29 00:11:09 +00:00
namespace TLang.VM
{
public class TNumber : TObject
{
2023-07-30 07:55:10 +00:00
public override string Type => "number";
public override bool True => Value != 0;
2023-07-29 00:11:09 +00:00
public double Value {get;set;}
public TNumber(double value)
{
this.Value = value;
}
2023-07-30 07:55:10 +00:00
public override string ToString()
{
return Value.ToString();
}
2023-07-29 00:11:09 +00:00
}
}