當前位置: 首頁>>代碼示例>>C#>>正文


C# CSharp.StackAlloc類代碼示例

本文整理匯總了C#中Mono.CSharp.StackAlloc的典型用法代碼示例。如果您正苦於以下問題:C# StackAlloc類的具體用法?C# StackAlloc怎麽用?C# StackAlloc使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StackAlloc類屬於Mono.CSharp命名空間,在下文中一共展示了StackAlloc類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: case_824

void case_824()
#line 5519 "cs-parser.jay"
{
		report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop]));		
	  }
開發者ID:segaman,項目名稱:NRefactory,代碼行數:6,代碼來源:cs-parser.cs

示例2: Visit

			public override object Visit (StackAlloc stackAllocExpression)
			{
				var result = new StackAllocExpression ();
				
				var location = LocationsBag.GetLocations (stackAllocExpression);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[0]), "stackalloc".Length), StackAllocExpression.StackAllocKeywordRole);
				result.AddChild ((INode)stackAllocExpression.TypeExpression.Accept (this), StackAllocExpression.Roles.ReturnType);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), StackAllocExpression.Roles.LBracket);
				result.AddChild ((INode)stackAllocExpression.CountExpression.Accept (this), StackAllocExpression.Roles.Expression);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[2]), 1), StackAllocExpression.Roles.RBracket);
				return result;
			}
開發者ID:pgoron,項目名稱:monodevelop,代碼行數:15,代碼來源:CSharpParser.cs

示例3: Visit

		public virtual object Visit (StackAlloc stackAllocExpression)
		{
			return null;
		}
開發者ID:KAW0,項目名稱:Alter-Native,代碼行數:4,代碼來源:visit.cs

示例4: case_823

void case_823()
#line 5514 "cs-parser.jay"
{
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
開發者ID:segaman,項目名稱:NRefactory,代碼行數:6,代碼來源:cs-parser.cs

示例5: Visit

			public override object Visit (StackAlloc stackAllocExpression)
			{
				var result = new StackAllocExpression ();
				
				var location = LocationsBag.GetLocations (stackAllocExpression);
				if (location != null)
					result.AddChild (new CSharpTokenNode (Convert (location[0]), "stackalloc".Length), StackAllocExpression.Roles.Keyword);
				result.AddChild (ConvertToType (stackAllocExpression.TypeExpression), StackAllocExpression.Roles.Type);
				if (location != null && location.Count > 1)
					result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), StackAllocExpression.Roles.LBracket);
				result.AddChild ((MonoDevelop.CSharp.Ast.Expression)stackAllocExpression.CountExpression.Accept (this), StackAllocExpression.Roles.Expression);
				if (location != null && location.Count > 2)
					result.AddChild (new CSharpTokenNode (Convert (location[2]), 1), StackAllocExpression.Roles.RBracket);
				return result;
			}
開發者ID:slluis,項目名稱:monodevelop,代碼行數:15,代碼來源:CSharpParser.cs

示例6: yyparse


//.........這裏部分代碼省略.........
			variables_bucket.Add (yyVals[0+yyTop]);
		yyVal = variables_bucket;
	  }
  break;
case 143:
#line 1169 "cs-parser.jay"
  {
		var decls = (List<object>) yyVals[-2+yyTop];
		decls.Add (yyVals[0+yyTop]);
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 144:
#line 1178 "cs-parser.jay"
  {
		yyVal = new VariableDeclaration ((Tokenizer.LocatedToken) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 145:
#line 1182 "cs-parser.jay"
  {
		yyVal = new VariableDeclaration ((Tokenizer.LocatedToken) yyVals[0+yyTop], null);
	  }
  break;
case 146:
#line 1186 "cs-parser.jay"
  {
		yyVal = null;
	  }
  break;
case 149:
#line 1195 "cs-parser.jay"
  {
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
	  }
  break;
case 150:
#line 1199 "cs-parser.jay"
  {
		yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 151:
#line 1203 "cs-parser.jay"
  {
		Report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop]));		
	  }
  break;
case 152:
#line 1211 "cs-parser.jay"
  {
		variables_bucket.Clear ();
		if (yyVals[0+yyTop] != null)
			variables_bucket.Add (yyVals[0+yyTop]);
		yyVal = variables_bucket;
	  }
  break;
case 153:
#line 1218 "cs-parser.jay"
  {
		var decls = (List<object>) yyVals[-2+yyTop];
		decls.Add (yyVals[0+yyTop]);
		yyVal = yyVals[-2+yyTop];
	  }
  break;
開發者ID:speier,項目名稱:shake,代碼行數:67,代碼來源:cs-parser.cs

示例7: case_772

void case_772()
{
		report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop]));		
	  }
開發者ID:animaonline,項目名稱:Portable-Mono.CSharp,代碼行數:5,代碼來源:cs-parser.cs

示例8: case_771

void case_771()
{
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
開發者ID:animaonline,項目名稱:Portable-Mono.CSharp,代碼行數:5,代碼來源:cs-parser.cs

示例9: yyparse


//.........這裏部分代碼省略.........
		var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
		var d = new BlockVariableDeclaration.Declarator (li, (Expression) yyVals[0+yyTop]);
		current_variable.AddDeclarator (d);
		current_block.AddLocalName (li);
	  	lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 784:
#line 5292 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (145, lexer.Location, "A const field requires a value to be provided");
	  }
  break;
case 785:
#line 5296 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_variable.Initializer = (Expression) yyVals[0+yyTop];
	  }
  break;
case 790:
#line 5313 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];	  
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
		var d = new BlockVariableDeclaration.Declarator (li, (Expression) yyVals[0+yyTop]);
		current_variable.AddDeclarator (d);
		current_block.AddLocalName (li);
	  	lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 792:
#line 5326 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 793:
#line 5331 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop]));		
	  }
  break;
case 794:
#line 5339 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
		lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 795:
#line 5343 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 796:
#line 5347 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 797:
#line 5348 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 798:
#line 5357 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
開發者ID:runefs,項目名稱:Marvin,代碼行數:67,代碼來源:cs-parser.cs

示例10: case_763

void case_763()
#line 4849 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		Report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop]));		
	  }
開發者ID:RainsSoft,項目名稱:MonoCompilerAsAService,代碼行數:6,代碼來源:cs-parser.cs

示例11: case_762

void case_762()
#line 4844 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
開發者ID:RainsSoft,項目名稱:MonoCompilerAsAService,代碼行數:6,代碼來源:cs-parser.cs


注:本文中的Mono.CSharp.StackAlloc類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。