Ejemplo n.º 1
0
 public virtual Statement VisitGoto(Goto Goto)
 {
     return Goto;
 }
Ejemplo n.º 2
0
 public override Statement VisitGoto(Goto Goto)
 {
     WriteLine("goto {0};", Goto.TargetLabel.Name);
     return Goto;
 }
Ejemplo n.º 3
0
 public override Statement VisitGoto(Goto Goto)
 {
     if (Goto == null) return null;
     return base.VisitGoto((Goto)Goto.Clone());
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 5
0
 public override Statement VisitGoto(Goto Goto)
 {
     throw new InvalidOperationException("Unexpected Goto node in BBSplitter");
 }
Ejemplo n.º 6
0
 public EventingVisitor(Action<Goto> visitGoto) { VisitedGoto += visitGoto; } public event Action<Goto> VisitedGoto; public override Statement VisitGoto(Goto Goto) { if (VisitedGoto != null) VisitedGoto(Goto); return base.VisitGoto(Goto); }
Ejemplo n.º 7
0
 public override Statement VisitGoto(Goto Goto)
 {
     if (Goto == null) return null;
     Goto.TargetLabel = (Identifier)this.VisitIdentifier(Goto.TargetLabel);
     return Goto;
 }