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 VisitIDENTIFIER(CASTIDENTIFIER node, VParam param = default(VParam))
 {
     return(default(Result));
 }
Example #3
0
 public override int VisitIDENTIFIER(CASTIDENTIFIER node, object param)
 {
     m_ostream.WriteLine("{0}->{1}", node.MParent.MNodeName, node.MNodeName);
     return(base.VisitIDENTIFIER(node));
 }
Example #4
0
        public string GetFunctionName()
        {
            CASTIDENTIFIER id = GetChild(contextType.CT_FUNCTIONDEFINITION_IDENTIFIER, 0) as CASTIDENTIFIER;

            return(id.M_Text);
        }