本文整理汇总了C#中Boo.Lang.Compiler.Ast.Method.get_Body方法的典型用法代码示例。如果您正苦于以下问题:C# Method.get_Body方法的具体用法?C# Method.get_Body怎么用?C# Method.get_Body使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Boo.Lang.Compiler.Ast.Method
的用法示例。
在下文中一共展示了Method.get_Body方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckForEmptyCoroutine
public void CheckForEmptyCoroutine(Method node)
{
if (this.IsEmptyCoroutine(node))
{
ReturnStatement statement;
ReturnStatement statement1 = statement = new ReturnStatement(LexicalInfo.Empty);
statement.set_Expression(Expression.Lift(this.EmptyEnumeratorReference));
node.get_Body().Add(statement);
}
}
示例2: OnMethod
public override void OnMethod(Method node)
{
if (EvalAnnotation.IsMarked(node))
{
this._currentMethod = this.GetEntity(node);
IType evaluationContextType = this.DefineEvaluationContext();
Block block = this.PrepareEvaluationContextInitialization(evaluationContextType);
this.Visit(node.get_Body());
node.get_Body().Insert(0, block);
}
}
示例3: function_body
public void function_body(Method method)
{
try
{
this.match(0x3f);
switch (this.LA(1))
{
case 12:
case 0x10:
case 0x21:
case 0x3b:
case 0x63:
this.parameter_declaration_list(method);
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)
{
method.set_ReturnType(reference);
}
break;
}
case 0x3d:
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
this.compound_statement(method.get_Body());
if (base.inputState.guessing == 0)
{
method.set_EndSourceLocation(method.get_Body().get_EndSourceLocation());
}
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_33_);
}
}
示例4: LastExpressionStatement
public ExpressionStatement LastExpressionStatement(Method method)
{
StatementCollection statements = method.get_Body().get_Statements();
return ((statements.Count != 0) ? (statements.get_Item(-1) as ExpressionStatement) : null);
}