Class AstManipulations

java.lang.Object
com.google.javascript.jscomp.AstManipulations

public final class AstManipulations extends Object
Utilities to abstract away certain common AST manipulations
  • Method Details

    • fuseExpressions

      public static Node fuseExpressions(Node exp1, Node exp2)
      Returns a single node equivalent to executing <expr1, expr2>.

      Requires that expr1 and expr2 are detached (i.e. have no parent nodes). If exp2 is EMPTY this just returns exp1.