tlang-runtime-compiler/VMTest/Program.cs

10 lines
281 B
C#
Raw Normal View History

2023-07-29 00:11:09 +00:00
using TLang.VM;
using var f = File.OpenRead("app.tvm");
TVMFile file = new TVMFile(f);
ChunkExecuter executer=new ChunkExecuter(file,file.Chunks[0],new RootEnvironment());
var res=executer.Execute() as TNumber;
if(res != null)
{
Console.WriteLine($"Number: {res.Value}");
}