コード例 #1
0
 public void visitForLoop(ForStatement forLoop) {
   pushState();
   forLoop.setVariableScope(currentScope);
   Parameter p = forLoop.getVariable();
   p.setInStaticContext(currentScope.isInStaticContext());
   if (p != ForStatement.FOR_LOOP_DUMMY) declare(p, forLoop);
   super.visitForLoop(forLoop);
   popState();
 }
コード例 #2
0
 @Override
 public void visitForLoop(final ForStatement forLoop) {
   super.visitForLoop(forLoop);
   Expression collectionExpression = forLoop.getCollectionExpression();
   if (!(collectionExpression instanceof ClosureListExpression)) {
     final ClassNode collectionType = getType(forLoop.getCollectionExpression());
     ClassNode componentType = inferLoopElementType(collectionType);
     forLoop.getVariable().setType(componentType);
     forLoop.getVariable().setOriginType(componentType);
   }
 }
コード例 #3
0
 public void visitForLoop(ForStatement forLoop) {
   forLoop.getCollectionExpression().visit(this);
   forLoop.getLoopBlock().visit(this);
 }