tlang-runtime-compiler/VMTest/Program.cs

10 lines
281 B
C#

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}");
}