本文整理汇总了C#中Boo.Lang.Compiler.Ast.BlockExpression.Annotate方法的典型用法代码示例。如果您正苦于以下问题:C# BlockExpression.Annotate方法的具体用法?C# BlockExpression.Annotate怎么用?C# BlockExpression.Annotate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Boo.Lang.Compiler.Ast.BlockExpression
的用法示例。
在下文中一共展示了BlockExpression.Annotate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: closure_expression
protected Expression closure_expression() //throws RecognitionException, TokenStreamException
{
Expression e;
IToken anchorBegin = null;
IToken anchorEnd = null;
e = null;
BlockExpression cbe = null;
ParameterDeclarationCollection parameters = null;
Block body = null;
try { // for error handling
anchorBegin = LT(1);
match(LBRACE);
if (0==inputState.guessing)
{
e = cbe = new BlockExpression(ToLexicalInfo(anchorBegin));
cbe.Annotate("inline");
parameters = cbe.Parameters;
body = cbe.Body;
}
{
bool synPredMatched349 = false;
if (((tokenSet_102_.member(LA(1))) && (tokenSet_103_.member(LA(2)))))
{
int _m349 = mark();
synPredMatched349 = true;
inputState.guessing++;
try {
{
closure_parameters_test();
}
}
catch (RecognitionException)
{
synPredMatched349 = false;
}
rewind(_m349);
inputState.guessing--;
}
if ( synPredMatched349 )
{
{
parameter_declaration_list(parameters);
match(BITWISE_OR);
}
}
else if ((tokenSet_104_.member(LA(1))) && (tokenSet_105_.member(LA(2)))) {
}
else
{
throw new NoViableAltException(LT(1), getFilename());
}
}
{
internal_closure_stmt(body);
{ // ( ... )*
for (;;)
{
if ((LA(1)==EOL||LA(1)==EOS))
{
eos();
{
switch ( LA(1) )
{
case ESEPARATOR:
case CAST:
case CHAR:
case FALSE:
case NOT:
case NULL:
case RAISE:
case RETURN:
case SELF:
case SUPER:
case THEN:
case TRUE:
case TYPEOF:
case YIELD:
case TRIPLE_QUOTED_STRING:
case LPAREN:
case DOUBLE_QUOTED_STRING:
case SINGLE_QUOTED_STRING:
case ID:
case MULTIPLY:
case LBRACK:
case COMMA:
case SPLICE_BEGIN:
case DOT:
case LBRACE:
case QQ_BEGIN:
case SUBTRACT:
case LONG:
case INCREMENT:
case DECREMENT:
//.........这里部分代码省略.........
示例2: function_expression
public BlockExpression function_expression()
{
BlockExpression m = null;
IToken token = null;
try
{
Block block;
token = this.LT(1);
this.match(0x13);
if (base.inputState.guessing == 0)
{
m = new BlockExpression(ToLexicalInfo(token));
m.Annotate("inline");
block = m.get_Body();
}
this.match(0x3f);
switch (this.LA(1))
{
case 12:
case 0x10:
case 0x21:
case 0x3b:
case 0x63:
this.parameter_declaration_list(m);
break;
case 0x40:
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
this.match(0x40);
switch (this.LA(1))
{
case 0x42:
{
this.match(0x42);
TypeReference reference = this.type_reference();
if (base.inputState.guessing == 0)
{
m.set_ReturnType(reference);
}
break;
}
case 12:
case 15:
case 0x13:
case 0x1b:
case 0x1d:
case 0x27:
case 40:
case 0x2a:
case 0x2c:
case 0x3b:
case 60:
case 0x3d:
case 0x3f:
case 0x44:
case 0x4f:
case 80:
case 0x52:
case 0x58:
case 0x67:
case 0x69:
case 0x6a:
case 0x6b:
case 0x6c:
case 0x6d:
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
if ((this.LA(1) == 0x3d) && tokenSet_13_.member(this.LA(2)))
{
this.block(block);
return m;
}
if (!tokenSet_16_.member(this.LA(1)) || !tokenSet_20_.member(this.LA(2)))
{
throw new NoViableAltException(this.LT(1), this.getFilename());
}
Expression expression2 = this.expression();
if (base.inputState.guessing == 0)
{
block.Add(expression2);
}
return m;
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_20_);
return m;
}
//.........这里部分代码省略.........