public Identifier name() //throws RecognitionException, TokenStreamException { Identifier ident; IToken t1 = null; IToken t2 = null; IToken t3 = null; ident = null; switch ( LA(1) ) { case IDENT: { t1 = LT(1); match(IDENT); if (0==inputState.guessing) { ident = new OpaqueIdentifier(t1.getText()); } break; } case STATICIDENT: { t2 = LT(1); match(STATICIDENT); if (0==inputState.guessing) { ident = new StaticVarIdentifier(t2.getText()); } break; } case INSTIDENT: { t3 = LT(1); match(INSTIDENT); if (0==inputState.guessing) { ident = new InstanceVarIdentifier(t3.getText()); } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } return ident; }
public virtual void VisitOpaqueIdentifier(OpaqueIdentifier opaqueIdentifier) { VisitNode(opaqueIdentifier.TypeReference); }
public override void VisitOpaqueIdentifier(OpaqueIdentifier identifier) { nodeStack.Push( CurrentNode.Nodes.Add("OpaqueIdentifier " + identifier.Name + " - " + identifier.TypeReference )); CurrentNode.Tag = identifier; base.VisitOpaqueIdentifier(identifier); nodeStack.Pop(); }