code: private void process(Node root, boolean hotSwap) {
      checkState(contextStack.isEmpty());
      contextStack.push(LexicalContext.newGlobalContext(root));
      if (hotSwap) {
        TranspilationPasses.hotSwapTranspile(compiler, root, transpiledFeatures, this);
      } else {
        TranspilationPasses.processTranspile(compiler, root, transpiledFeatures, this);
      }
      TranspilationPasses.maybeMarkFeaturesAsTranspiledAway(compiler, transpiledFeatures);
      checkState(contextStack.element().function == null);
      contextStack.remove();
      checkState(contextStack.isEmpty());
    }
docs: Helper function for both HotSwapCompilerPass#hotSwapScript and CompilerPass#process.
  
  @param root Root of AST to rewrite