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

24 lines
603 B
C#
Raw Normal View History

2023-07-29 00:11:09 +00:00
namespace TLang.VM
{
public class TClosure : TCallable
{
2023-07-30 07:55:10 +00:00
2023-07-29 00:11:09 +00:00
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);
2023-07-30 07:55:10 +00:00
executer.ClassName=ClassName;
2023-07-29 00:11:09 +00:00
return executer.Execute(args);
}
}
}