Class IR


  • public class IR
    extends java.lang.Object
    An AST construction helper class
    • Method Detail

      • empty

        public static Node empty()
      • export

        public static Node export​(Node declaration)
      • importNode

        public static Node importNode​(Node name,
                                      Node importSpecs,
                                      Node moduleIdentifier)
      • importStar

        public static Node importStar​(java.lang.String name)
      • function

        public static Node function​(Node name,
                                    Node params,
                                    Node body)
      • arrowFunction

        public static Node arrowFunction​(Node name,
                                         Node params,
                                         Node body)
      • paramList

        public static Node paramList​(Node... params)
      • root

        public static Node root​(Node... rootChildren)
      • block

        public static Node block()
      • block

        public static Node block​(Node stmt)
      • block

        public static Node block​(Node... stmts)
      • block

        public static Node block​(java.util.List<Node> stmts)
      • script

        public static Node script()
      • script

        public static Node script​(Node... stmts)
      • script

        public static Node script​(java.util.List<Node> stmts)
      • var

        public static Node var​(Node lhs)
      • let

        public static Node let​(Node lhs)
      • constNode

        public static Node constNode​(Node lhs,
                                     Node value)
      • declaration

        public static Node declaration​(Node lhs,
                                       Token type)
      • declaration

        public static Node declaration​(Node lhs,
                                       Node value,
                                       Token type)
      • returnNode

        public static Node returnNode()
      • returnNode

        public static Node returnNode​(Node expr)
      • yield

        public static Node yield()
      • yield

        public static Node yield​(Node expr)
      • await

        public static Node await​(Node expr)
      • throwNode

        public static Node throwNode​(Node expr)
      • exprResult

        public static Node exprResult​(Node expr)
      • ifNode

        public static Node ifNode​(Node cond,
                                  Node then)
      • doNode

        public static Node doNode​(Node body,
                                  Node cond)
      • whileNode

        public static Node whileNode​(Node cond,
                                     Node body)
      • switchNode

        public static Node switchNode​(Node cond,
                                      Node... cases)
      • caseNode

        public static Node caseNode​(Node expr,
                                    Node body)
      • defaultCase

        public static Node defaultCase​(Node body)
      • label

        public static Node label​(Node name,
                                 Node stmt)
      • labelName

        public static Node labelName​(java.lang.String name)
      • tryFinally

        public static Node tryFinally​(Node tryBody,
                                      Node finallyBody)
      • tryCatch

        public static Node tryCatch​(Node tryBody,
                                    Node catchNode)
      • tryCatchFinally

        public static Node tryCatchFinally​(Node tryBody,
                                           Node catchNode,
                                           Node finallyBody)
      • catchNode

        public static Node catchNode​(Node expr,
                                     Node body)
      • breakNode

        public static Node breakNode()
      • breakNode

        public static Node breakNode​(Node name)
      • continueNode

        public static Node continueNode()
      • continueNode

        public static Node continueNode​(Node name)
      • call

        public static Node call​(Node target,
                                Node... args)
      • startOptChainCall

        public static Node startOptChainCall​(Node target,
                                             Node... args)
      • continueOptChainCall

        public static Node continueOptChainCall​(Node target,
                                                Node... args)
      • newNode

        public static Node newNode​(Node target,
                                   Node... args)
      • name

        public static Node name​(java.lang.String name)
      • startOptChainGetprop

        public static Node startOptChainGetprop​(Node target,
                                                Node prop)
      • continueOptChainGetprop

        public static Node continueOptChainGetprop​(Node target,
                                                   Node prop)
      • getprop

        public static Node getprop​(Node target,
                                   Node prop)
      • getprop

        public static Node getprop​(Node target,
                                   Node prop,
                                   Node... moreProps)
      • getprop

        public static Node getprop​(Node target,
                                   java.lang.String prop,
                                   java.lang.String... moreProps)
      • startOptChainGetelem

        public static Node startOptChainGetelem​(Node target,
                                                Node elem)
      • continueOptChainGetelem

        public static Node continueOptChainGetelem​(Node target,
                                                   Node elem)
      • getelem

        public static Node getelem​(Node target,
                                   Node elem)
      • delprop

        public static Node delprop​(Node target)
      • assign

        public static Node assign​(Node target,
                                  Node expr)
      • comma

        public static Node comma​(Node expr1,
                                 Node expr2)
      • coalesce

        public static Node coalesce​(Node expr1,
                                    Node expr2)
      • not

        public static Node not​(Node expr1)
      • lt

        public static Node lt​(Node expr1,
                              Node expr2)
        "<"
      • ge

        public static Node ge​(Node expr1,
                              Node expr2)
        ">="
      • eq

        public static Node eq​(Node expr1,
                              Node expr2)
        "=="
      • ne

        public static Node ne​(Node expr1,
                              Node expr2)
        "!="
      • sheq

        public static Node sheq​(Node expr1,
                                Node expr2)
        "==="
      • shne

        public static Node shne​(Node expr1,
                                Node expr2)
        "!=="
      • voidNode

        public static Node voidNode​(Node expr1)
      • neg

        public static Node neg​(Node expr1)
      • pos

        public static Node pos​(Node expr1)
      • inc

        public static Node inc​(Node exp,
                               boolean isPost)
      • dec

        public static Node dec​(Node exp,
                               boolean isPost)
      • objectlit

        public static Node objectlit​(Node... propdefs)
      • objectPattern

        public static Node objectPattern​(Node... keys)
      • arrayPattern

        public static Node arrayPattern​(Node... keys)
      • computedProp

        public static Node computedProp​(Node key,
                                        Node value)
      • propdef

        public static Node propdef​(Node string,
                                   Node value)
      • arraylit

        public static Node arraylit​(Node... exprs)
      • arraylit

        public static Node arraylit​(java.lang.Iterable<Node> exprs)
      • regexp

        public static Node regexp​(Node expr)
      • regexp

        public static Node regexp​(Node expr,
                                  Node flags)
      • string

        public static Node string​(java.lang.String s)
      • stringKey

        public static Node stringKey​(java.lang.String s)
      • stringKey

        public static Node stringKey​(java.lang.String s,
                                     Node value)
      • quotedStringKey

        public static Node quotedStringKey​(java.lang.String s,
                                           Node value)
      • iterRest

        public static Node iterRest​(Node target)
      • objectRest

        public static Node objectRest​(Node target)
      • iterSpread

        public static Node iterSpread​(Node expr)
      • objectSpread

        public static Node objectSpread​(Node expr)
      • superNode

        public static Node superNode()
      • memberFunctionDef

        public static Node memberFunctionDef​(java.lang.String name,
                                             Node function)
      • number

        public static Node number​(double d)
      • bigint

        public static Node bigint​(java.math.BigInteger b)
      • thisNode

        public static Node thisNode()
      • trueNode

        public static Node trueNode()
      • falseNode

        public static Node falseNode()
      • nullNode

        public static Node nullNode()
      • typeof

        public static Node typeof​(Node expr)
      • importMeta

        public static Node importMeta()
      • mayBeStatement

        public static boolean mayBeStatement​(Node n)
        It isn't possible to always determine if a detached node is a expression, so make a best guess.
      • mayBeExpression

        public static boolean mayBeExpression​(Node n)
        It isn't possible to always determine if a detached node is a expression, so make a best guess.