Esempio n. 1
0
        public override int VisitExpr_PLUS(MINICParser.Expr_PLUSContext context)
        {
            ASTComposite       m_parent = m_parents.Peek();
            CASTExpressionPlus newnode  = new CASTExpressionPlus(context.GetText(), m_parents.Peek(), 1);

            m_parent.AddChild(newnode, m_parentContext.Peek());
            m_parents.Push(newnode);
            this.VisitElementInContext(context.expression(), m_parentContext, contextType.CT_EXPRESSION_PLUS);

            m_parents.Pop();
            return(0);
        }
Esempio n. 2
0
        public override int VisitExpr_PLUS(MINICParser.Expr_PLUSContext context)
        {
            int    serial = ms_serialCounter++;
            string s      = "Expr_PLUS_" + serial;

            outFile.WriteLine("\"{0}\"->\"{1}\";", m_labels.Peek(), s);

            m_labels.Push(s);

            base.VisitChildren(context);

            m_labels.Pop();
            return(0);
        }