private static Expression CompileExistence(Op op, Scope scope) { var p = scope.FreeVariable("ref"); var @ref = new Literal {Value = p.Name}; var fst = new Parens {Body = new Assign {Variable = @ref, Value = op.First}}; return Compile(new If {Condition = new Existence {Expression = fst}, Body = @ref, ElseBody = op.Second}, scope); }
public static Expression CompileParens(Parens node, Scope scope) { return Compile(node.Body, scope); }