• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CSharp.YieldBreak类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Mono.CSharp.YieldBreak的典型用法代码示例。如果您正苦于以下问题:C# YieldBreak类的具体用法?C# YieldBreak怎么用?C# YieldBreak使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



YieldBreak类属于Mono.CSharp命名空间,在下文中一共展示了YieldBreak类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: case_908

void case_908()
#line 6058 "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]));
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:15,代码来源:cs-parser.cs


示例2: Visit

			public override object Visit (YieldBreak yieldBreakStatement)
			{
				var result = new YieldStatement ();
				var location = LocationsBag.GetLocations (yieldBreakStatement);
				result.AddChild (new CSharpTokenNode (Convert (yieldBreakStatement.loc), "yield".Length), YieldStatement.YieldKeywordRole);
				if (location != null) {
					result.AddChild (new CSharpTokenNode (Convert (location[0]), "break".Length), YieldStatement.BreakKeywordRole);
					result.AddChild (new CSharpTokenNode (Convert (location[1]), ";".Length), YieldStatement.Roles.Semicolon);
				}
				return result;
			}
开发者ID:pgoron,项目名称:monodevelop,代码行数:11,代码来源:CSharpParser.cs


示例3: Visit

		public virtual object Visit (YieldBreak yieldBreakStatement)
		{
			return null;
		}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:4,代码来源:visit.cs


示例4: case_899

void case_899()
#line 6010 "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]));
	  }
开发者ID:kaagati,项目名称:NRefactory,代码行数:15,代码来源:cs-parser.cs


示例5: yyparse


//.........这里部分代码省略.........
			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:
#line 5125 "cs-parser.jay"
  {
		Report.Error (1627, GetLocation (yyVals[-1+yyTop]), "Expression expected after yield return");
		yyVal = null;
	  }
  break;
case 798:
#line 5130 "cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+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 YieldBreak (lt.Location);
	  }
  break;
case 801:
#line 5154 "cs-parser.jay"
  {
		yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List<Catch>) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false);
	  }
  break;
case 802:
#line 5158 "cs-parser.jay"
  {
		yyVal = new TryFinally ((Statement) yyVals[-2+yyTop], (Block) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 803:
#line 5162 "cs-parser.jay"
  {
		yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List<Catch>) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]), true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
	  }
  break;
case 804:
#line 5166 "cs-parser.jay"
  {
		Report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally");
		yyVal = null;
	  }
  break;
case 805:
#line 5174 "cs-parser.jay"
  {
		var l = new List<Catch> (2);
开发者ID:speier,项目名称:shake,代码行数:66,代码来源:cs-parser.cs


示例6: yyparse


//.........这里部分代码省略.........
		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);
		lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 857:
#line 5718 "D:\GitHub\M\Marvin\mcs\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.ParametersBlock.TopBlock.IsIterator = true;
		yyVal = new YieldBreak (lt.Location);
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 860:
#line 5740 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List<Catch>) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false);
	  }
  break;
case 861:
#line 5744 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TryFinally ((Statement) yyVals[-2+yyTop], (Block) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 862:
#line 5749 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List<Catch>) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]), true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 863:
#line 5754 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally");
		yyVal = null;
	  }
  break;
case 864:
#line 5762 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs


示例7: case_827

void case_827()
#line 5236 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\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.ParametersBlock.TopBlock.IsIterator = true;
		yyVal = new YieldBreak (lt.Location);
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:15,代码来源:cs-parser.cs



注:本文中的Mono.CSharp.YieldBreak类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# JavaScript.JsEmitContext类代码示例发布时间:2022-05-26
下一篇:
C# CSharp.Yield类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap