Class AstManipulations


  • public final class AstManipulations
    extends java.lang.Object
    Utilities to abstract away certain common AST manipulations
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Node fuseExpressions​(Node exp1, Node exp2)
      Returns a single node equivalent to executing <expr1, expr2>.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.