当前位置: 首页>>代码示例>>C#>>正文


C# CSharp.Do类代码示例

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


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

示例1: Visit

			public override object Visit (Do doStatement)
			{
				var result = new WhileStatement (WhilePosition.End);
				var location = LocationsBag.GetLocations (doStatement);
				result.AddChild (new CSharpTokenNode (Convert (doStatement.loc), "do".Length), WhileStatement.DoKeywordRole);
				result.AddChild ((INode)doStatement.EmbeddedStatement.Accept (this), WhileStatement.Roles.EmbeddedStatement);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[0]), "while".Length), WhileStatement.WhileKeywordRole);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), WhileStatement.Roles.LPar);
				result.AddChild ((INode)doStatement.expr.Accept (this), WhileStatement.Roles.Condition);
				if (location != null) {
					result.AddChild (new CSharpTokenNode (Convert (location[2]), 1), WhileStatement.Roles.RPar);
					result.AddChild (new CSharpTokenNode (Convert (location[3]), 1), WhileStatement.Roles.Semicolon);
				}
				
				return result;
			}
开发者ID:pgoron,项目名称:monodevelop,代码行数:18,代码来源:CSharpParser.cs

示例2: case_860

void case_860()
#line 5721 "cs-parser.jay"
{
		Error_SyntaxError (yyToken);
	  
		yyVal = new Do ((Statement) yyVals[-4+yyTop], (BooleanExpression) yyVals[-1+yyTop], GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:8,代码来源:cs-parser.cs

示例3: Visit

			public override object Visit(Do doStatement)
			{
				var result = new DoWhileStatement();
				var location = LocationsBag.GetLocations(doStatement);
				result.AddChild(new CSharpTokenNode(Convert(doStatement.loc), DoWhileStatement.DoKeywordRole), DoWhileStatement.DoKeywordRole);
				if (doStatement.Statement != null)
					result.AddChild((Statement)doStatement.Statement.Accept(this), Roles.EmbeddedStatement);
				if (location != null)
					result.AddChild(new CSharpTokenNode(Convert(location [0]), DoWhileStatement.WhileKeywordRole), DoWhileStatement.WhileKeywordRole);
				if (location != null && location.Count > 1)
					result.AddChild(new CSharpTokenNode(Convert(location [1]), Roles.LPar), Roles.LPar);
				if (doStatement.expr != null)
					result.AddChild((Expression)doStatement.expr.Accept(this), Roles.Condition);
				if (location != null && location.Count > 2) {
					result.AddChild(new CSharpTokenNode(Convert(location [2]), Roles.RPar), Roles.RPar);
					if (location.Count > 3)
						result.AddChild(new CSharpTokenNode(Convert(location [3]), Roles.Semicolon), Roles.Semicolon);
				}
				
				return result;
			}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:21,代码来源:CSharpParser.cs

示例4: case_858

void case_858()
#line 5711 "cs-parser.jay"
{
		yyVal = new Do ((Statement) yyVals[-5+yyTop], (BooleanExpression) yyVals[-2+yyTop], GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:6,代码来源:cs-parser.cs

示例5: case_859

void case_859()
#line 5716 "cs-parser.jay"
{
		Error_SyntaxError (yyToken);
		yyVal = new Do ((Statement) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop]), Location.Null);
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:6,代码来源:cs-parser.cs

示例6: yyparse


//.........这里部分代码省略.........
		Lexer.check_incorrect_doc_comment ();
	  }
  break;
case 7:
#line 370 "cs-parser.jay"
  {
		Lexer.check_incorrect_doc_comment ();
	  }
  break;
case 15:
#line 393 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		string s = lt.Value;
		if (s != "alias"){
			syntax_error (lt.Location, "`alias' expected");
		} else if (RootContext.Version == LanguageVersion.ISO_1) {
			Report.FeatureIsNotAvailable (lt.Location, "external alias");
		} else {
			lt = (LocatedToken) yyVals[-1+yyTop]; 
			current_namespace.AddUsingExternalAlias (lt.Value, lt.Location);
		}
	  }
  break;
case 16:
#line 406 "cs-parser.jay"
  {
	  	syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected");   /* TODO: better*/
	  }
  break;
case 19:
#line 418 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 20:
#line 423 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 21:
#line 431 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		current_namespace.AddUsingAlias (lt.Value, (MemberName) yyVals[-1+yyTop], (Location) yyVals[-4+yyTop]);
	  }
  break;
case 22:
#line 435 "cs-parser.jay"
  {
		CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
		yyVal = null;
	  }
  break;
case 23:
#line 443 "cs-parser.jay"
  {
		current_namespace.AddUsing ((MemberName) yyVals[-1+yyTop], (Location) yyVals[-2+yyTop]);
	  }
  break;
case 24:
#line 455 "cs-parser.jay"
开发者ID:lewurm,项目名称:benchmarker,代码行数:67,代码来源:cs-parser.cs

示例7: Visit

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

示例8: case_809

void case_809()
{
		Error_SyntaxError (yyToken);
	  
		yyVal = new Do ((Statement) yyVals[-4+yyTop], (BooleanExpression) yyVals[-1+yyTop], GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:7,代码来源:cs-parser.cs

示例9: case_810

void case_810()
#line 5360 "cs-parser.jay"
{
		Error_SyntaxError (yyToken);
		yyVal = new Do ((Statement) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop]));
	  }
开发者ID:xamarin-release-manager,项目名称:monodevelop,代码行数:6,代码来源:cs-parser.cs

示例10: case_808

void case_808()
{
		Error_SyntaxError (yyToken);
		yyVal = new Do ((Statement) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop]), Location.Null);
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:5,代码来源:cs-parser.cs

示例11: case_807

void case_807()
{
		yyVal = new Do ((Statement) yyVals[-5+yyTop], (BooleanExpression) yyVals[-2+yyTop], GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:5,代码来源:cs-parser.cs

示例12: case_796

void case_796()
#line 5273 "cs-parser.jay"
{
		var loc = GetLocation (yyVals[-2+yyTop]);
		report.Error (-100, loc, "Expected `while'");
		yyVal = new Do ((Statement) yyVals[-1+yyTop], null, loc);
	  }
开发者ID:N3X15,项目名称:ILSpy,代码行数:7,代码来源:cs-parser.cs

示例13: yyparse


//.........这里部分代码省略.........
		lexer.parsing_modifiers = true;
	  }
  break;
case 97:
#line 895 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration",
			GetSymbolName (yyToken));
		yyVal = null;
		lexer.parsing_generic_declaration = false;
	  }
  break;
case 98:
#line 908 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 99:
#line 912 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		push_current_class (new Struct (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
	  }
  break;
case 100:
#line 918 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);

		if (doc_support)
			current_container.DocComment = Lexer.consume_doc_comment ();

		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[-5+yyTop]));
		
		lexer.parsing_modifiers = true;
	  }
  break;
case 101:
#line 931 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 102:
#line 936 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_declaration;
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 103:
#line 942 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lbag.AppendToMember (current_class, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
		yyVal = pop_current_class ();
	  }
  break;
case 104:
#line 947 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs

示例14: case_793

void case_793()
#line 5035 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		yyVal = new Do ((Statement) yyVals[-5+yyTop], (BooleanExpression) yyVals[-2+yyTop], GetLocation (yyVals[-6+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:6,代码来源:cs-parser.cs


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