/// <summary> /// Lifts the expression represented by <paramref name="argument" />, if necessary. /// </summary> public override SyntaxNode VisitArgument(ArgumentSyntax argument) { if (!_liftedMethodStack.Peek()) { return(base.VisitArgument(argument)); } var requiresLifting = argument.HasAttribute <LiftExpressionAttribute>(SemanticModel); argument = (ArgumentSyntax)base.VisitArgument(argument); if (!requiresLifting) { return(argument); } var lambda = Syntax.ValueReturningLambdaExpression(Enumerable.Empty <ParameterSyntax>(), argument.Expression).WithTrivia(argument); return(argument.WithExpression((ExpressionSyntax)lambda)); }