tlang-runtime-compiler/TLangScriptRunner/Program.cs

14 lines
514 B
C#

using TLang.VM;
using TLang.BytecodeCompiler;
using TLang.Parser;
using TLang.Common;
var node=Parse.ParseFromFiles(args);
MemoryStream memoryStream=new MemoryStream();
ByteCodeGenerator.GenerateToStream(node,memoryStream,TLangVersion.Version,new TLangVersion(1,0,0,0));
memoryStream.Position=0;
RootEnvironment environment=new RootEnvironment();
environment.LoadStd();
TVMFile file=new TVMFile(memoryStream,environment);
file.LoadDependencies(new DefaultDependencyPool());
file.DefaultChunkExecuter.Execute();