2023-03-10 10:12:36 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2023-03-09 19:40:14 +00:00
|
|
|
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)
|
|
|
|
{
|
2023-06-08 18:14:35 +00:00
|
|
|
returnType = node.Execute(nodeEnv.SubEnv);
|
2023-03-09 19:40:14 +00:00
|
|
|
}else{
|
|
|
|
returnType = node.Execute(nodeEnv);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return returnType;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|