@Override
  public void process(Node externs, Node root) {
    NodeTraversal.traverseRoots(compiler, new CollectUndeclaredNames(), externs, root);
    NodeTraversal.traverseRoots(compiler, this, externs, root);
    NodeTraversal.traverseRoots(compiler, new RenameReferences(), externs, root);

    LoopClosureTransformer transformer = new LoopClosureTransformer();
    NodeTraversal.traverseRoots(compiler, transformer, externs, root);
    transformer.transformLoopClosure();
    varify();
    NodeTraversal.traverseRoots(
        compiler, new RewriteBlockScopedFunctionDeclaration(), externs, root);
  }
예제 #2
0
 /** Convenience method for running this pass over a tree with this class as a callback. */
 @Override
 public void process(Node externs, Node root) {
   NodeTraversal.traverseRoots(compiler, this, externs, root);
 }
예제 #3
0
 @Override
 public void process(Node externs, Node root) {
   NodeTraversal.traverseRoots(compiler, this, externs, root);
   NodeTraversal.traverseEs6(compiler, root, new NonExternChecks());
 }
예제 #4
0
 static void traverseRootsTyped(AbstractCompiler compiler, Callback cb, Node externs, Node root) {
   NodeTraversal t = new NodeTraversal(compiler, cb, SyntacticScopeCreator.makeTyped(compiler));
   t.traverseRoots(externs, root);
 }
예제 #5
0
 public static void traverseRoots(
     AbstractCompiler compiler, Callback cb, Node externs, Node root) {
   NodeTraversal t = new NodeTraversal(compiler, cb);
   t.traverseRoots(externs, root);
 }
 /**
  * Convenience method for running this pass over a tree with this
  * class as a callback.
  */
 @Override
 public void process(Node externs, Node root) {
   NodeTraversal.traverseRoots(
       compiler, Lists.newArrayList(externs, root), this);
 }