本文整理汇总了C#中Boo.Lang.Compiler.Ast.MethodInvocationExpression.get_ParentNode方法的典型用法代码示例。如果您正苦于以下问题:C# MethodInvocationExpression.get_ParentNode方法的具体用法?C# MethodInvocationExpression.get_ParentNode怎么用?C# MethodInvocationExpression.get_ParentNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Boo.Lang.Compiler.Ast.MethodInvocationExpression
的用法示例。
在下文中一共展示了MethodInvocationExpression.get_ParentNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessTypeofBuiltin
private void ProcessTypeofBuiltin(MethodInvocationExpression node)
{
if (node.get_Arguments().get_Count() != 1)
{
this.Error(node, new CompilerError("UCE0001", node.get_Target().get_LexicalInfo(), "'typeof' takes a single argument.", null));
}
else
{
IType type = node.get_Arguments().get_Item(0).get_Entity() as IType;
if (type != null)
{
node.get_ParentNode().Replace(node, this.get_CodeBuilder().CreateTypeofExpression(type));
}
else
{
node.set_Target(this.get_CodeBuilder().CreateReference(this._UnityRuntimeServices_GetTypeOf));
this.BindExpressionType(node, this.get_TypeSystemServices().TypeType);
}
}
}
示例2: ReplaceEvalByEvaluatorEval
public void ReplaceEvalByEvaluatorEval(MethodInvocationExpression node)
{
node.get_ParentNode().Replace(node, this.CreateEvaluatorInvocation(node));
}
示例3: ProcessMethodInvocation
protected override void ProcessMethodInvocation(MethodInvocationExpression node, IMethod method)
{
base.ProcessMethodInvocation(node, method);
if (UtilitiesModule.IsPossibleStartCoroutineInvocationForm(node))
{
UnityScript.TypeSystem.UnityScriptTypeSystem unityScriptTypeSystem = this.UnityScriptTypeSystem;
if (unityScriptTypeSystem.IsScriptType(method.get_DeclaringType()) && unityScriptTypeSystem.IsGenerator(method))
{
if (this.get_CurrentMethod().get_IsStatic())
{
this.get_Warnings().Add(UnityScriptWarnings.CannotStartCoroutineFromStaticFunction(node.get_LexicalInfo(), method.get_Name()));
}
else
{
node.get_ParentNode().Replace(node, this.get_CodeBuilder().CreateMethodInvocation(this.get_CodeBuilder().CreateSelfReference(node.get_LexicalInfo(), this.get_CurrentType()), this._StartCoroutine, node));
}
}
}
}