public override object Visit (YieldBreak yieldBreakStatement) { var result = new YieldBreakStatement (); var location = LocationsBag.GetLocations (yieldBreakStatement); result.AddChild (new CSharpTokenNode (Convert (yieldBreakStatement.loc), YieldBreakStatement.YieldKeywordRole), YieldBreakStatement.YieldKeywordRole); if (location != null) { result.AddChild (new CSharpTokenNode (Convert (location [0]), YieldBreakStatement.BreakKeywordRole), YieldBreakStatement.BreakKeywordRole); if (location.Count > 1) result.AddChild (new CSharpTokenNode (Convert (location [1]), Roles.Semicolon), Roles.Semicolon); } return result; }
public virtual object Visit (YieldBreak yieldBreakStatement) { return null; }
void case_984() #line 6570 "cs-parser.jay" { var lt = (LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; if (s != "yield"){ report.Error (1003, lt.Location, "; expected"); } else if (lang_version == LanguageVersion.ISO_1){ FeatureIsNotAvailable (lt.Location, "iterators"); } current_block.ParametersBlock.TopBlock.IsIterator = true; yyVal = new YieldBreak (lt.Location); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); }
void case_906() #line 6053 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; if (s != "yield"){ report.Error (1003, lt.Location, "; expected"); } else if (lang_version == LanguageVersion.ISO_1){ FeatureIsNotAvailable (lt.Location, "iterators"); } current_block.Explicit.RegisterIteratorYield (); yyVal = new YieldBreak (lt.Location); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); }