25 lines
624 B
C#
25 lines
624 B
C#
using System.Collections.Generic;
|
|
|
|
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;
|
|
}
|
|
}
|
|
} |