Пример #1
0
 public virtual Statement VisitGotoCase(GotoCase gotoCase)
 {
     if (gotoCase == null) return null;
     gotoCase.CaseLabel = this.VisitExpression(gotoCase.CaseLabel);
     return gotoCase;
 }
Пример #2
0
 public override Statement VisitGotoCase(GotoCase gotoCase)
 {
     if (gotoCase == null) return null;
     return base.VisitGotoCase((GotoCase)gotoCase.Clone());
 }
Пример #3
0
        public override Statement VisitGotoCase(GotoCase gotoCase)
        {
            WriteStart("goto case ");
            this.VisitExpression(gotoCase.CaseLabel);
            WriteFinish(";");

            return gotoCase;
        }
Пример #4
0
 private Statement ParseGoto(TokenSet followers){
   SourceContext sctx = this.scanner.CurrentSourceContext;
   Debug.Assert(this.currentToken == Token.Goto);
   this.GetNextToken();
   Statement result = null;
   switch(this.currentToken){
     case Token.Case:
       this.GetNextToken();
       result = new GotoCase(this.ParseExpression(followers|Token.Semicolon));
       break;
     case Token.Default:
       result = new GotoCase(null);
       this.GetNextToken();
       break;
     default:
       result = new Goto(this.scanner.GetIdentifier());
       this.SkipIdentifierOrNonReservedKeyword();
       break;
   }
   sctx.EndPos = this.scanner.endPos;
   result.SourceContext = sctx;
   this.SkipSemiColon(followers);
   return result;
 }
Пример #5
0
 public EventingVisitor(Action<GotoCase> visitGotoCase) { VisitedGotoCase += visitGotoCase; } public event Action<GotoCase> VisitedGotoCase; public override Statement VisitGotoCase(GotoCase gotoCase) { if (VisitedGotoCase != null) VisitedGotoCase(gotoCase); return base.VisitGotoCase(gotoCase); }