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


C# Block.AddLocalName方法代碼示例

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


在下文中一共展示了Block.AddLocalName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: yyparse


//.........這裏部分代碼省略.........
#line 5168 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 765:
#line 5177 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop];
	  	yyVal = yyVals[-1+yyTop];
	  }
  break;
case 766:
#line 5185 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 768:
#line 5193 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (async_block) {
			report.Error (4003, GetLocation (yyVals[0+yyTop]), "`await' cannot be used as an identifier within an async method or lambda expression");
			yyVal = Tokenizer.LocatedToken.Create ("await", GetLocation (yyVals[0+yyTop]));
		}
	  }
  break;
case 769:
#line 5203 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 770:
#line 5210 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;
		current_variable = null;
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 771:
#line 5216 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new BlockConstantDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 772:
#line 5223 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;
		current_variable = null;
		lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 774:
#line 5233 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_variable.Initializer = (Expression) yyVals[0+yyTop];
開發者ID:runefs,項目名稱:Marvin,代碼行數:67,代碼來源:cs-parser.cs


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