本文整理汇总了C#中Mono.CSharp.GotoDefault类的典型用法代码示例。如果您正苦于以下问题:C# GotoDefault类的具体用法?C# GotoDefault怎么用?C# GotoDefault使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GotoDefault类属于Mono.CSharp命名空间,在下文中一共展示了GotoDefault类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Visit
public override object Visit (GotoDefault gotoDefault)
{
var result = new GotoStatement (GotoType.CaseDefault);
result.AddChild (new CSharpTokenNode (Convert (gotoDefault.loc), "goto".Length), GotoStatement.Roles.Keyword);
var location = LocationsBag.GetLocations (gotoDefault);
if (location != null) {
result.AddChild (new CSharpTokenNode (Convert (location[0]), "default".Length), GotoStatement.DefaultKeywordRole);
result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), GotoStatement.Roles.Semicolon);
}
return result;
}
示例2: case_900
void case_900()
#line 5985 "cs-parser.jay"
{
yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
示例3: Visit
public override object Visit(GotoDefault gotoDefault)
{
var result = new GotoDefaultStatement();
result.AddChild(new CSharpTokenNode(Convert(gotoDefault.loc), GotoDefaultStatement.GotoKeywordRole), GotoDefaultStatement.GotoKeywordRole);
var location = LocationsBag.GetLocations(gotoDefault);
if (location != null) {
result.AddChild(new CSharpTokenNode(Convert(location [0]), GotoDefaultStatement.DefaultKeywordRole), GotoDefaultStatement.DefaultKeywordRole);
if (location.Count > 1)
result.AddChild(new CSharpTokenNode(Convert(location [1]), Roles.Semicolon), Roles.Semicolon);
}
return result;
}
示例4: Visit
public virtual object Visit (GotoDefault gotoDefault)
{
return null;
}
示例5: yyparse
//.........这里部分代码省略.........
}
yyVal = end_block (lexer.Location);
}
break;
case 789:
#line 5066 "cs-parser.jay"
{
yyVal = new Break (GetLocation (yyVals[-1+yyTop]));
}
break;
case 790:
#line 5073 "cs-parser.jay"
{
yyVal = new Continue (GetLocation (yyVals[-1+yyTop]));
}
break;
case 791:
#line 5080 "cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
yyVal = new Goto (lt.Value, lt.Location);
}
break;
case 792:
#line 5085 "cs-parser.jay"
{
yyVal = new GotoCase ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
}
break;
case 793:
#line 5089 "cs-parser.jay"
{
yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
}
break;
case 794:
#line 5096 "cs-parser.jay"
{
yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
case 795:
#line 5103 "cs-parser.jay"
{
yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
case 796:
#line 5110 "cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
string s = lt.Value;
if (s != "yield"){
Report.Error (1003, lt.Location, "; expected");
yyVal = null;
}
if (RootContext.Version == LanguageVersion.ISO_1){
Report.FeatureIsNotAvailable (lt.Location, "yield statement");
yyVal = null;
}
current_block.Toplevel.IsIterator = true;
yyVal = new Yield ((Expression) yyVals[-1+yyTop], lt.Location);
}
break;
case 797:
示例6: case_849
void case_849()
{
yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
示例7: yyparse
//.........这里部分代码省略.........
break;
case 849:
#line 5651 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Break (GetLocation (yyVals[-1+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
break;
case 850:
#line 5659 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Continue (GetLocation (yyVals[-1+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
break;
case 851:
#line 5667 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
yyVal = new Goto (lt.Value, lt.Location);
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
break;
case 852:
#line 5673 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new GotoCase ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
break;
case 853:
#line 5678 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
break;
case 854:
#line 5686 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
break;
case 855:
#line 5694 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
break;
case 856:
#line 5702 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
} else if (yyVals[-1+yyTop] == null) {
report.Error (1627, GetLocation (yyVals[0+yyTop]), "Expression expected after yield return");
} else if (lang_version == LanguageVersion.ISO_1){
FeatureIsNotAvailable (lt.Location, "iterators");
}
current_block.ParametersBlock.TopBlock.IsIterator = true;
yyVal = new Yield ((Expression) yyVals[-1+yyTop], lt.Location);
示例8: case_823
void case_823()
#line 5196 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}