23 lines
589 B
C#
23 lines
589 B
C#
namespace tlang
|
|
{
|
|
internal class EnvironmentNode : Node
|
|
{
|
|
public List<Node> Nodes {get;set;}=new List<Node>();
|
|
|
|
public override TObject Execute(IScopeEnvironment nodeEnv)
|
|
{
|
|
|
|
TObject returnType = TObject.Null;
|
|
foreach(var node in Nodes)
|
|
{
|
|
if(node is EnvironmentNode)
|
|
{
|
|
returnType =node.Execute(nodeEnv.SubEnv);
|
|
}else{
|
|
returnType = node.Execute(nodeEnv);
|
|
}
|
|
}
|
|
return returnType;
|
|
}
|
|
}
|
|
} |