public override int VisitTerminal(ITerminalNode node)
        {
            ASTComposite m_parent = m_parents.Peek();

            switch (node.Symbol.Type)
            {
            case MINICLexer.NUMBER:
                CASTNUMBER newnode1 = new CASTNUMBER(node.Symbol.Text, m_parents.Peek());
                m_parent.AddChild(newnode1, m_parentContext.Peek());
                break;

            case MINICLexer.IDENTIFIER:
                CASTIDENTIFIER newnode2 = new CASTIDENTIFIER(node.Symbol.Text, m_parents.Peek());
                m_parent.AddChild(newnode2, m_parentContext.Peek());
                break;

            default:
                break;
            }
            return(base.VisitTerminal(node));
        }
 public virtual Result VisitNUMBER(CASTNUMBER node, VParam param = default(VParam))
 {
     return(default(Result));
 }
Exemple #3
0
 public override int VisitNUMBER(CASTNUMBER node, object param)
 {
     m_ostream.WriteLine("{0}->{1}", node.MParent.MNodeName, node.MNodeName);
     return(base.VisitNUMBER(node));
 }