Package org.mozilla.javascript.ast

Examples of org.mozilla.javascript.ast.ForLoop


    return loop;
  }

  @Override
  public AstNode forLoop(AstNode init, AstNode condition, AstNode update, AstNode body) {
    ForLoop loop = new ForLoop();
    loop.setInitializer(init);
    loop.setCondition(condition);
    loop.setIncrement(update);
    loop.setBody(body);
    return loop;
  }
View Full Code Here


      WhileLoop w = (WhileLoop) parent;
      w.setBody(createBlockWithNode(node));
    } else if (parent instanceof ForLoop) {
      /* the parent is a for and there are no braces, so we should make a new block */
      /* I don't think you can find this in the real world, but just to be sure */
      ForLoop f = (ForLoop) parent;
      f.setBody(createBlockWithNode(node));
    }

    return node.getParent();
  }
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.ast.ForLoop

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.