本文整理汇总了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];