public override void LeaveMethodInvocationExpression(MethodInvocationExpression node)
 {
     IEntityWithParameters parameters = node.get_Target().get_Entity() as IEntityWithParameters;
     if (parameters != null)
     {
         ExpressionCollection args = node.get_Arguments();
         if (parameters.get_AcceptVarArgs() && UnityCallableResolutionServiceModule.IsArrayArgumentExplicitlyProvided(parameters.GetParameters(), args))
         {
             UnaryExpression expression2;
             Expression expression = args.get_Item(-1);
             UnaryExpression expression1 = expression2 = new UnaryExpression();
             expression2.set_Operator(7);
             expression2.set_Operand(expression);
             expression2.set_ExpressionType(this.GetExpressionType(expression));
             args.ReplaceAt(-1, expression2);
         }
     }
 }
 public override void LeaveMethodInvocationExpression(MethodInvocationExpression node)
 {
     if (this.IsEvalInvocation(node))
     {
         if (!string.IsNullOrEmpty(this.UnityScriptParameters.DisableEval))
         {
             this.Error(node, UnityScriptCompilerErrors.EvalHasBeenDisabled(node.get_Target().get_LexicalInfo(), this.UnityScriptParameters.DisableEval));
         }
         else
         {
             this.ReplaceEvalByEvaluatorEval(node);
         }
     }
 }
 private bool IsConstructorInvocation(MethodInvocationExpression node)
 {
     return ((node.get_Target().get_Entity() != null) && (node.get_Target().get_Entity().get_EntityType() == 0x10));
 }
 public bool IsEvalInvocation(MethodInvocationExpression node)
 {
     return (node.get_Target().get_Entity() == UnityScriptTypeSystem.UnityScriptEval);
 }
 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);
         }
     }
 }