@NotNull private ClosureExpression createGroovyTruthClosureExpression(VariableScope scope) { ClosureExpression result = new ClosureExpression(params(param(OBJECT_TYPE, "it")), returnS(varX("it"))); result.setVariableScope(scope.copy()); return result; }
protected Expression transformClosureExpression(ClosureExpression ce) { boolean oldInClosure = inClosure; inClosure = true; Statement code = ce.getCode(); if (code != null) code.visit(this); inClosure = oldInClosure; return ce; }