public interface HotSwapCompilerPass extends CompilerPass
The additional method is hotSwapScript
which runs this pass on a
subtree of the AST. Each pass that is intended to support hot-swap style
should implement this interface.
It is assumed that Node
argument of hotSwapScript
is the root
of a sub-tree in AST that represents a JS file and so is of type Token.SCRIPT
.
Modifier and Type | Method and Description |
---|---|
void |
hotSwapScript(Node scriptRoot,
Node originalRoot)
Process the JS with root node root.
|
process
void hotSwapScript(Node scriptRoot, Node originalRoot)
scriptRoot
- 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
.Copyright © 2009-2020 Google. All Rights Reserved.