/* * private string DeclarationSetPrint(AddQueryNode node) * { * StringBuilder dclList = new StringBuilder(); * dclList.Append($"declaration set:("); * foreach (AbstractNode v in node.Dcls) * { * dclList.Append($"{v.Name}, "); * } * dclList.Remove(dclList.Length - 2, 2); * dclList.Append(")"); * return dclList.ToString(); * } */ public override void VisitChildren(AbstractNode node) { /*if (node is BoolComparisonNode boolNode && boolNode.ChildCount != 0 && boolNode.Children[0] is ExpressionNode) * { * foreach (var child in (node.Children[0] as ExpressionNode).ExpressionParts) * { * child.Parent = node; * if (child != null) * { * child.Accept(this); * } * } * } * else * { */ foreach (AbstractNode child in node.GetChildren()) { child.Parent = node; if (child != null) { child.Accept(this); } } //} }
public virtual void VisitChildren(AbstractNode node) { foreach (AbstractNode child in node.GetChildren()) { if (child != null) { child.Accept(this); } } }
public void VisitChildrenNewScope(AbstractNode node, BlockType Type) { if (node != null) { _symbolTable.OpenScope(Type); foreach (AbstractNode child in node.GetChildren()) { child.Parent = node; child.Accept(this); } _symbolTable.CloseScope(); } }
public void VisitChildrenNewScope(AbstractNode node) { if (node != null) { SymbolTable.OpenScope(node.Name); foreach (AbstractNode child in node.GetChildren()) { child.Accept(this); } SymbolTable.CloseScope(); } }