@Override public void visitBlockStatement(BlockStatement block) { Set<String> names = new HashSet<String>(varStack.getLast()); varStack.add(names); super.visitBlockStatement(block); varStack.remove(names); }
@Override public void visitBlockStatement(final BlockStatement block) { super.visitBlockStatement(block); trn.visitBlockStatement(block); }
public void visitBlockStatement(BlockStatement block) { VariableScope oldScope = currentScope; currentScope = block.getVariableScope(); super.visitBlockStatement(block); currentScope = oldScope; }
private Expression transformClosureExpression(ClosureExpression exp) { if (exp.getCode() instanceof BlockStatement) { BlockStatement code = (BlockStatement) exp.getCode(); super.visitBlockStatement(code); } return exp; }
@Override public void visitBlockStatement(BlockStatement block) { Set<String> names = new HashSet<String>(); names.addAll(varStack.getLast()); varStack.add(names); super.visitBlockStatement(block); varStack.remove(names); }
public void visitBlockStatement(BlockStatement block) { Set<String> names = new HashSet<String>(); names.addAll(varStack.getLast()); varStack.add(names); super.visitBlockStatement(block); varStack.remove(names); }
public void visitBlockStatement(BlockStatement block) { Set<String> names = new HashSet<String>(); names.addAll(varStack.getLast()); varStack.add(names); super.visitBlockStatement(block); varStack.remove(names); }
public void visitBlockStatement(BlockStatement block) { VariableScope oldScope = currentScope; currentScope = block.getVariableScope(); super.visitBlockStatement(block); currentScope = oldScope; }
public void visitBlockStatement(BlockStatement block) { VariableScope oldScope = currentScope; currentScope = block.getVariableScope(); super.visitBlockStatement(block); currentScope = oldScope; }
public void visitBlockStatement(BlockStatement block) { VariableScope oldScope = currentScope; currentScope = block.getVariableScope(); super.visitBlockStatement(block); currentScope = oldScope; }
public void visitBlockStatement(BlockStatement block) { VariableScope oldScope = currentScope; currentScope = block.getVariableScope(); super.visitBlockStatement(block); currentScope = oldScope; }
@Override public void visitBlockStatement(BlockStatement block) { try (StackVariableSet scope = new StackVariableSet(this)) { super.visitBlockStatement(block); } }
private static void performSubstitutions(final List<Closure<Expression>> context, final ASTNode astNode) { final Iterator<Closure<Expression>> iterator = context.iterator(); ClassCodeExpressionTransformer trn = new ClassCodeExpressionTransformer() { public Expression transform(Expression expression) { if (!(expression instanceof MethodCallExpression)) { return super.transform(expression); } MethodCallExpression call = (MethodCallExpression) expression; if (!DOLLAR_VALUE.equals(call.getMethodAsString())) { return super.transform(expression); } return iterator.next().call(); } @Override protected SourceUnit getSourceUnit() { // Could be null if there are no errors return null; } }; if (astNode instanceof BlockStatement) { trn.visitBlockStatement((BlockStatement) astNode); } else if (astNode instanceof ClassNode) { trn.visitClass((ClassNode) astNode); } }