tlang-runtime-compiler/TLang.VM/TClosure.cs

22 lines
552 B
C#

namespace TLang.VM
{
public class TClosure : TCallable
{
private TVMFile file;
private Chunk chunk;
private TLangEnvironment env;
public TClosure(TVMFile file, Chunk chunk, TLangEnvironment env)
{
this.file = file;
this.chunk = chunk;
this.env = env;
}
public override TObject Execute(params TObject[] args)
{
ChunkExecuter executer = new ChunkExecuter(file,chunk,env);
return executer.Execute(args);
}
}
}