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

C# CSharp.EmptyStatement类代码示例

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

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



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

示例1: case_832

void case_832()
#line 5572 "cs-parser.jay"
{
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:6,代码来源:cs-parser.cs


示例2: Visit

			public override object Visit(Mono.CSharp.EmptyStatement emptyStatement)
			{
				var result = new EmptyStatement();
				result.Location = Convert(emptyStatement.loc);
				return result;
			}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:6,代码来源:CSharpParser.cs


示例3: yyparse


//.........这里部分代码省略.........
  break;
case 863:
  case_863();
  break;
case 864:
#line 5757 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 865:
  case_865();
  break;
case 866:
  case_866();
  break;
case 867:
#line 5778 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 868:
  case_868();
  break;
case 869:
  case_869();
  break;
case 870:
  case_870();
  break;
case 871:
#line 5812 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 873:
  case_873();
  break;
case 874:
  case_874();
  break;
case 876:
#line 5836 "cs-parser.jay"
  { yyVal = null; }
  break;
case 878:
#line 5841 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 882:
  case_882();
  break;
case 883:
  case_883();
  break;
case 884:
  case_884();
  break;
case 885:
  case_885();
  break;
case 886:
  case_886();
  break;
case 887:
  case_887();
开发者ID:segaman,项目名称:NRefactory,代码行数:67,代码来源:cs-parser.cs


示例4: case_782

void case_782()
#line 5247 "cs-parser.jay"
{
		/* Uses lexer.Location because semicolon location is not kept in quick mode*/
		yyVal = new EmptyStatement (lexer.Location);
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:6,代码来源:cs-parser.cs


示例5: Resolve

		public override bool Resolve (BlockContext ec)
		{
			Block prev_block = ec.CurrentBlock;
			bool ok = true;

			ec.CurrentBlock = this;
			ec.StartFlowBranching (this);

			Report.Debug (4, "RESOLVE BLOCK", StartLocation, ec.CurrentBranching);

			//
			// Compiler generated scope statements
			//
			if (scope_initializers != null) {
				for (resolving_init_idx = 0; resolving_init_idx < scope_initializers.Count; ++resolving_init_idx) {
					scope_initializers[resolving_init_idx.Value].Resolve (ec);
				}

				resolving_init_idx = null;
			}

			//
			// This flag is used to notate nested statements as unreachable from the beginning of this block.
			// For the purposes of this resolution, it doesn't matter that the whole block is unreachable 
			// from the beginning of the function.  The outer Resolve() that detected the unreachability is
			// responsible for handling the situation.
			//
			int statement_count = statements.Count;
			for (int ix = 0; ix < statement_count; ix++){
				Statement s = statements [ix];

				//
				// Warn if we detect unreachable code.
				//
				if (unreachable) {
					if (s is EmptyStatement)
						continue;

					if (!unreachable_shown && !(s is LabeledStatement)) {
						ec.Report.Warning (162, 2, s.loc, "Unreachable code detected");
						unreachable_shown = true;
					}

					Block c_block = s as Block;
					if (c_block != null)
						c_block.unreachable = c_block.unreachable_shown = true;
				}

				//
				// Note that we're not using ResolveUnreachable() for unreachable
				// statements here.  ResolveUnreachable() creates a temporary
				// flow branching and kills it afterwards.  This leads to problems
				// if you have two unreachable statements where the first one
				// assigns a variable and the second one tries to access it.
				//

				if (!s.Resolve (ec)) {
					ok = false;
					if (ec.IsInProbingMode)
						break;

					statements [ix] = new EmptyStatement (s.loc);
					continue;
				}

				if (unreachable && !(s is LabeledStatement) && !(s is Block))
					statements [ix] = new EmptyStatement (s.loc);

				unreachable = ec.CurrentBranching.CurrentUsageVector.IsUnreachable;
				if (unreachable && s is LabeledStatement)
					throw new InternalErrorException ("should not happen");
			}

			Report.Debug (4, "RESOLVE BLOCK DONE", StartLocation,
				      ec.CurrentBranching, statement_count);

			while (ec.CurrentBranching is FlowBranchingLabeled)
				ec.EndFlowBranching ();

			bool flow_unreachable = ec.EndFlowBranching ();

			ec.CurrentBlock = prev_block;

			if (flow_unreachable)
				flags |= Flags.HasRet;

			// If we're a non-static `struct' constructor which doesn't have an
			// initializer, then we must initialize all of the struct's fields.
			if (this == ParametersBlock.TopBlock && !ParametersBlock.TopBlock.IsThisAssigned (ec) && !flow_unreachable)
				ok = false;

			return ok;
		}
开发者ID:alisci01,项目名称:mono,代码行数:93,代码来源:statement.cs


示例6: Visit

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


示例7: yyparse


//.........这里部分代码省略.........
  break;
case 688:
#line 4499 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null && (Block) yyVals[0+yyTop] != current_block){
			current_block.AddStatement ((Statement) yyVals[0+yyTop]);
			current_block = (Block) yyVals[0+yyTop];
		}
	  }
  break;
case 689:
#line 4506 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 718:
#line 4547 "cs-parser.jay"
  {
		  Report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 719:
#line 4552 "cs-parser.jay"
  {
		  Report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 720:
#line 4560 "cs-parser.jay"
  {
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 721:
#line 4567 "cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		LabeledStatement labeled = new LabeledStatement (lt.Value, lt.Location);

		if (current_block.AddLabel (labeled))
			current_block.AddStatement (labeled);
	  }
  break;
case 723:
#line 4579 "cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null){
			var de = (Tuple<FullNamedExpression, List<object>>) yyVals[-1+yyTop];
			yyVal = declare_local_variables (de.Item1, de.Item2, de.Item1.Location);
		}
	  }
  break;
case 724:
#line 4587 "cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null){
			var de = (Tuple<FullNamedExpression, List<object>>) yyVals[-1+yyTop];

			yyVal = declare_local_constants (de.Item1, de.Item2);
		}
	  }
  break;
case 725:
开发者ID:speier,项目名称:shake,代码行数:67,代码来源:cs-parser.cs


示例8: yyparse


//.........这里部分代码省略.........
  {
		yyVal = new SwitchSection ((List<SwitchLabel>) yyVals[-2+yyTop], current_block);
	  }
  break;
case 784:
  case_784();
  break;
case 785:
  case_785();
  break;
case 786:
  case_786();
  break;
case 787:
#line 5031 "cs-parser.jay"
  {
		yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 792:
  case_792();
  break;
case 793:
  case_793();
  break;
case 794:
  case_794();
  break;
case 795:
  case_795();
  break;
case 796:
#line 5085 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 798:
  case_798();
  break;
case 799:
  case_799();
  break;
case 801:
#line 5106 "cs-parser.jay"
  { yyVal = null; }
  break;
case 803:
#line 5111 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 807:
  case_807();
  break;
case 808:
  case_808();
  break;
case 809:
  case_809();
  break;
case 810:
  case_810();
  break;
case 817:
  case_817();
  break;
case 818:
  case_818();
开发者ID:Ein,项目名称:monodevelop,代码行数:67,代码来源:cs-parser.cs


示例9: case_780

void case_780()
{
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:5,代码来源:cs-parser.cs


示例10: case_732

void case_732()
{
		/* Uses lexer.Location because semicolon location is not kept in quick mode*/
		yyVal = new EmptyStatement (lexer.Location);
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:5,代码来源:cs-parser.cs


示例11: yyparse


//.........这里部分代码省略.........
		yyVal = null;
	  }
  break;
case 720:
#line 5012 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 721:
#line 5016 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 750:
#line 5057 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		  report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 751:
#line 5062 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		  report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 752:
#line 5067 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 753:
#line 5075 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		/* Uses lexer.Location because semicolon location is not kept in quick mode*/
		yyVal = new EmptyStatement (lexer.Location);
	  }
  break;
case 754:
#line 5083 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location);

		current_block.AddLabel (labeled);
		current_block.AddStatement (labeled);
	  }
  break;
case 757:
#line 5096 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-1+yyTop] is VarExpr)
			yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location);
	  
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 758:
#line 5112 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		/* Ok, the above "primary_expression" is there to get rid of*/
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs


示例12: case_770

void case_770()
#line 4896 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:6,代码来源:cs-parser.cs


示例13: case_727

void case_727()
#line 4615 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		/* Uses lexer.Location because semicolon location is not kept in quick mode*/
		yyVal = new EmptyStatement (lexer.Location);
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:6,代码来源:cs-parser.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CSharp.EnumMember类代码示例发布时间:2022-05-26
下一篇:
C# CSharp.EmptyExpression类代码示例发布时间: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