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