Пример #1
0
        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);
            }
        }
Пример #2
0
 public override void EnterArgListDecl([NotNull] CmanParser.ArgListDeclContext context)
 {
     _nodes.Push(new ASTArgListNode(context, _nodes.Peek()));
 }
Пример #3
0
 public ASTArgListNode(CmanParser.ArgListDeclContext context, ASTNode parent)
     : base(parent)
 {
     SetLocation(context);
 }