tlang-interperter-cs/ScopeNode.cs

17 lines
417 B
C#
Raw Normal View History

2023-03-09 19:40:14 +00:00
namespace tlang
{
public class ScopeNode : Node
{
public List<Node> Body {get;set;}= new List<Node>();
public override TObject Execute(IScopeEnvironment nodeEnv)
{
var sub = nodeEnv.SubEnv;
TObject obj=new TNull();
foreach(var item in Body)
{
obj=item.Execute(sub);
}
return obj;
}
}
}