|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.jscomp.NodeUtil
public final class NodeUtil
NodeUtil contains utilities that get properties from the Node object.
Method Summary | |
---|---|
static Collection<Node> |
getVarsDeclaredInBranch(Node root)
Retrieves vars declared in the current node tree, excluding descent scopes. |
static Node |
newExpr(Node child)
Creates an EXPR_RESULT. |
static Node |
newFunctionNode(String name,
List<Node> params,
Node body,
int lineno,
int charno)
Creates function name(params_0, ..., params_n) { body }. |
static Node |
newQualifiedNameNode(CodingConvention convention,
String name,
int lineno,
int charno)
Creates a node representing a qualified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Node newExpr(Node child)
child
- The expression itself.
public static Node newFunctionNode(String name, List<Node> params, Node body, int lineno, int charno)
public static Node newQualifiedNameNode(CodingConvention convention, String name, int lineno, int charno)
name
- A qualified name (e.g. "foo" or "foo.bar.baz")lineno
- The source line offset.charno
- The source character offset from start of the line.
public static Collection<Node> getVarsDeclaredInBranch(Node root)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |