12 lines
350 B
C#
12 lines
350 B
C#
using TLang.VM;
|
|
using var f = File.OpenRead("app.tvm");
|
|
var env=new RootEnvironment();
|
|
TVMFile file = new TVMFile(f,env);
|
|
file.LoadDependencies(new DefaultDependencyPool());
|
|
ChunkExecuter executer=new ChunkExecuter(file,file.Chunks[0],env);
|
|
var res=executer.Execute() as TNumber;
|
|
if(res != null)
|
|
{
|
|
Console.WriteLine($"Number: {res.Value}");
|
|
}
|