public override void ExitArgListDecl([NotNull] CmanParser.ArgListDeclContext context) { var args = new List <ASTNode>(); while (!(_nodes.Peek() is ASTArgListNode)) { args.Add(_nodes.Pop()); } var argListNode = (ASTArgListNode)_nodes.Peek(); foreach (var a in args) { argListNode.AddArgument((ASTVariableNode)a); } }
public override void EnterArgListDecl([NotNull] CmanParser.ArgListDeclContext context) { _nodes.Push(new ASTArgListNode(context, _nodes.Peek())); }
public ASTArgListNode(CmanParser.ArgListDeclContext context, ASTNode parent) : base(parent) { SetLocation(context); }