private static final class Es6RewriteGenerators.ControlExitsCheck extends java.lang.Object implements NodeTraversal.Callback
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
addJumps |
(package private) int |
breakCatchers |
(package private) int |
continueCatchers |
(package private) boolean |
exited |
private Node |
finallyName |
private int |
finallyStartState |
(package private) java.util.List<java.lang.String> |
labels |
(package private) int |
throwCatchers |
Constructor and Description |
---|
ControlExitsCheck() |
ControlExitsCheck(Node finallyName,
int finallyStartState) |
Modifier and Type | Method and Description |
---|---|
boolean |
didExit() |
boolean |
shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent)
Visits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed.
|
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
int continueCatchers
int breakCatchers
int throwCatchers
java.util.List<java.lang.String> labels
boolean exited
boolean addJumps
private Node finallyName
private int finallyStartState
ControlExitsCheck(Node finallyName, int finallyStartState)
ControlExitsCheck()
public boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)
NodeTraversal.Callback
Visits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed. If children are
traversed, they will be visited by
NodeTraversal.Callback.visit(NodeTraversal, Node, Node)
in postorder.
Implementations can have side effects (e.g. modifying the parse tree).
shouldTraverse
in interface NodeTraversal.Callback
public void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.Callback
Visits a node in postorder (after its children have been visited).
A node is visited only if all its parents should be traversed
(NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)
).
Implementations can have side effects (e.g. modifying the parse tree).
visit
in interface NodeTraversal.Callback
public boolean didExit()