public override void OnMethodInvocationExpression(MethodInvocationExpression node) { if (_owner != null || node.Target.Entity != BuiltinFunction.Eval) { return; } var statements = ExpandAssignmentToValueTypeMember(node); var newBloc = new Block(statements); var toBeReplaced = node.GetAncestor <Statement>(); toBeReplaced.ParentNode.Replace(toBeReplaced, newBloc); }
override public void OnMethodInvocationExpression(MethodInvocationExpression node) { if (!TypeSystemServices.IsDuckTyped(node.Target)) { base.OnMethodInvocationExpression(node); return; } if (TypeSystemServices.IsQuackBuiltin(node.Target)) { ExpandQuackInvocation(node); return; } base.OnMethodInvocationExpression(node); if (node.GetAncestor(NodeType.Constructor) == null || (node.Target.NodeType != NodeType.SelfLiteralExpression && node.Target.NodeType != NodeType.SuperLiteralExpression) || node.Target.Entity as IConstructor == null) { ExpandCallableInvocation(node); } }