Class Es6RewriteScriptsToModules

    • Constructor Detail

      • Es6RewriteScriptsToModules

        public Es6RewriteScriptsToModules​(AbstractCompiler compiler)
        Creates a new Es6RewriteModules instance which can be used to rewrite ES6 modules to a concatenable form.
    • Method Detail

      • process

        public void process​(Node externs,
                            Node root)
        Description copied from interface: CompilerPass
        Process the JS with root node root. Can modify the contents of each Node tree
        Specified by:
        process in interface CompilerPass
        Parameters:
        externs - Top of external JS tree
        root - Top of JS tree
      • hotSwapScript

        public void hotSwapScript​(Node scriptNode,
                                  Node originalRoot)
        Description copied from interface: HotSwapCompilerPass
        Process the JS with root node root. This is supposed to be significantly faster compared to corresponding full-compiler passes.
        Specified by:
        hotSwapScript in interface HotSwapCompilerPass
        Parameters:
        scriptNode - Root node corresponding to the file that is modified, should be of type Token.SCRIPT.
        originalRoot - Root node corresponding to the original version of the file that is modified. Should be of type token.SCRIPT.