public CreateSave ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRWRAP wrap ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP | ||
wrap | Microsoft.CSharp.RuntimeBinder.Semantics.EXPRWRAP | |
return | Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP |
public EXPRBINOP CreateSave(EXPRWRAP wrap)
{
Debug.Assert(wrap != null);
EXPRBINOP expr = CreateBinop(ExpressionKind.EK_SAVE, wrap.type, wrap.GetOptionalExpression(), wrap);
expr.setAssignment();
return expr;
}
private static Expr CreateWraps(ExprBoundLambda anonmeth) { Expr sequence = null; for (Symbol sym = anonmeth.ArgumentScope.firstChild; sym != null; sym = sym.nextChild) { if (!(sym is LocalVariableSymbol local)) { continue; } Debug.Assert(anonmeth.Expression != null); Expr create = GenerateParameter(local.name.Text, local.GetType()); local.wrap = ExprFactory.CreateWrap(create); Expr save = ExprFactory.CreateSave(local.wrap); if (sequence == null) { sequence = save; } else { sequence = ExprFactory.CreateSequence(sequence, save); } } return(sequence); }