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

24 lines
603 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);
executer.ClassName=ClassName;
return executer.Execute(args);
}
}
}