| java.lang.Object org.mozilla.javascript.Node
All known Subclasses: org.mozilla.javascript.ScriptOrFnNode,
Node | public class Node (Code) | | This class implements the root of the intermediate representation.
author: Norris Boyd author: Mike McCabe |
Inner Class :public static class Jump extends Node | |
Inner Class :static class Symbol | |
Inner Class :static class Scope extends Jump | |
Constructor Summary | |
public | Node(int nodeType) | public | Node(int nodeType, Node child) | public | Node(int nodeType, Node left, Node right) | public | Node(int nodeType, Node left, Node mid, Node right) | public | Node(int nodeType, int line) | public | Node(int nodeType, Node child, int line) | public | Node(int nodeType, Node left, Node right, int line) | public | Node(int nodeType, Node left, Node mid, Node right, int line) |
BOTHLEFTRIGHT | final public static int BOTHLEFTRIGHT(Code) | | |
DECR_FLAGPOST_FLAG | final public static int DECR_FLAGPOST_FLAG(Code) | | |
END_DROPS_OFF | final static int END_DROPS_OFF(Code) | | |
END_RETURNS | final static int END_RETURNS(Code) | | |
END_RETURNS_VALUE | final static int END_RETURNS_VALUE(Code) | | |
END_UNREACHED | final static int END_UNREACHED(Code) | | These flags enumerate the possible ways a statement/function can
terminate. These flags are used by endCheck() and by the Parser to
detect inconsistent return usage.
END_UNREACHED is reserved for code paths that are assumed to always be
able to execute (example: throw, continue)
END_DROPS_OFF indicates if the statement can transfer control to the
next one. Statement such as return dont. A compound statement may have
some branch that drops off control to the next statement.
END_RETURNS indicates that the statement can return (without arguments)
END_RETURNS_VALUE indicates that the statement can return a value.
A compound statement such as
if (condition) {
return value;
}
Will be detected as (END_DROPS_OFF | END_RETURN_VALUE) by endCheck()
|
END_YIELDS | final static int END_YIELDS(Code) | | |
FUNCTION_PROPLOCAL_PROPLOCAL_BLOCK_PROPREGEXP_PROPCASEARRAY_PROPTARGETBLOCK_PROPVARIABLE_PROPISNUMBER_PROPDIRECTCALL_PROPSPECIALCALL_PROPSKIP_INDEXES_PROPOBJECT_IDS_PROPINCRDECR_PROPCATCH_SCOPE_PROPLABEL_ID_PROPMEMBER_TYPE_PROPNAME_PROPCONTROL_BLOCK_PROPPARENTHESIZED_PROPGENERATOR_END_PROPDESTRUCTURING_ARRAY_LENGTHDESTRUCTURING_NAMESLAST_PROP | final public static int FUNCTION_PROPLOCAL_PROPLOCAL_BLOCK_PROPREGEXP_PROPCASEARRAY_PROPTARGETBLOCK_PROPVARIABLE_PROPISNUMBER_PROPDIRECTCALL_PROPSPECIALCALL_PROPSKIP_INDEXES_PROPOBJECT_IDS_PROPINCRDECR_PROPCATCH_SCOPE_PROPLABEL_ID_PROPMEMBER_TYPE_PROPNAME_PROPCONTROL_BLOCK_PROPPARENTHESIZED_PROPGENERATOR_END_PROPDESTRUCTURING_ARRAY_LENGTHDESTRUCTURING_NAMESLAST_PROP(Code) | | |
NON_SPECIALCALLSPECIALCALL_EVALSPECIALCALL_WITH | final public static int NON_SPECIALCALLSPECIALCALL_EVALSPECIALCALL_WITH(Code) | | |
PROPERTY_FLAGATTRIBUTE_FLAGDESCENDANTS_FLAG | final public static int PROPERTY_FLAGATTRIBUTE_FLAGDESCENDANTS_FLAG(Code) | | |
lineno | protected int lineno(Code) | | |
Node | public Node(int nodeType)(Code) | | |
Node | public Node(int nodeType, int line)(Code) | | |
Node | public Node(int nodeType, Node child, int line)(Code) | | |
addChildAfter | public void addChildAfter(Node newChild, Node node)(Code) | | Add 'child' after 'node'.
|
addChildBefore | public void addChildBefore(Node newChild, Node node)(Code) | | Add 'child' before 'node'.
|
addChildToBack | public void addChildToBack(Node child)(Code) | | |
addChildToFront | public void addChildToFront(Node child)(Code) | | |
addChildrenToBack | public void addChildrenToBack(Node children)(Code) | | |
addChildrenToFront | public void addChildrenToFront(Node children)(Code) | | |
getDouble | final public double getDouble()(Code) | | Can only be called when getType() == Token.NUMBER
|
getExistingIntProp | public int getExistingIntProp(int propType)(Code) | | |
getIntProp | public int getIntProp(int propType, int defaultValue)(Code) | | |
getLineno | public int getLineno()(Code) | | |
getScope | final public Scope getScope()(Code) | | Can only be called when node has String context.
|
getString | final public String getString()(Code) | | Can only be called when node has String context.
|
getType | public int getType()(Code) | | |
hasChildren | public boolean hasChildren()(Code) | | |
hasConsistentReturnUsage | public boolean hasConsistentReturnUsage()(Code) | | Checks that every return usage in a function body is consistent with the
requirements of strict-mode.
true if the function satisfies strict mode requirement. |
hasSideEffects | public boolean hasSideEffects()(Code) | | |
labelId | final public int labelId()(Code) | | |
labelId | public void labelId(int labelId)(Code) | | |
newNumber | public static Node newNumber(double number)(Code) | | |
putIntProp | public void putIntProp(int propType, int prop)(Code) | | |
removeChild | public void removeChild(Node child)(Code) | | |
removeProp | public void removeProp(int propType)(Code) | | |
replaceChildAfter | public void replaceChildAfter(Node prevChild, Node newChild)(Code) | | |
setDouble | final public void setDouble(double number)(Code) | | |
setScope | final public void setScope(Scope s)(Code) | | Can only be called when node has String context.
|
setString | final public void setString(String s)(Code) | | Can only be called when node has String context.
|
setType | public void setType(int type)(Code) | | |
|
|