org.mozilla.javascript
Class FunctionNode
java.lang.Object
org.mozilla.javascript.Node
org.mozilla.javascript.Node.Jump
org.mozilla.javascript.ScriptOrFnNode
org.mozilla.javascript.FunctionNode
public class FunctionNode
- extends ScriptOrFnNode
Nested classes/interfaces inherited from class org.mozilla.javascript.Node |
Node.Jump |
Fields inherited from class org.mozilla.javascript.Node |
ATTRIBUTE_FLAG, BOTH, CASEARRAY_PROP, CATCH_SCOPE_PROP, CONTROL_BLOCK_PROP, DECR_FLAG, DESCENDANTS_FLAG, DESTRUCTURING_ARRAY_LENGTH, DESTRUCTURING_NAMES, DIRECTCALL_PROP, FUNCTION_PROP, GENERATOR_END_PROP, INCRDECR_PROP, ISNUMBER_PROP, LABEL_ID_PROP, LAST_PROP, LEFT, lineno, LOCAL_BLOCK_PROP, LOCAL_PROP, MEMBER_TYPE_PROP, NAME_PROP, NON_SPECIALCALL, OBJECT_IDS_PROP, PARENTHESIZED_PROP, POST_FLAG, PROPERTY_FLAG, REGEXP_PROP, RIGHT, SKIP_INDEXES_PROP, SPECIALCALL_EVAL, SPECIALCALL_PROP, SPECIALCALL_WITH, TARGETBLOCK_PROP, VARIABLE_PROP |
Methods inherited from class org.mozilla.javascript.ScriptOrFnNode |
addFunction, addRegexp, getBaseLineno, getCompilerData, getEncodedSourceEnd, getEncodedSourceStart, getEndLineno, getFunctionCount, getFunctionNode, getIndexForNameNode, getNextTempName, getParamAndVarConst, getParamAndVarCount, getParamAndVarNames, getParamCount, getParamOrVarName, getRegexpCount, getRegexpFlags, getRegexpString, getSourceName, setBaseLineno, setCompilerData, setEncodedSourceBounds, setEndLineno, setSourceName |
Methods inherited from class org.mozilla.javascript.Node |
addChildAfter, addChildBefore, addChildrenToBack, addChildrenToFront, addChildToBack, addChildToFront, getChildBefore, getDouble, getExistingIntProp, getFirstChild, getIntProp, getLastChild, getLastSibling, getLineno, getNext, getProp, getScope, getString, getType, hasChildren, hasConsistentReturnUsage, hasSideEffects, labelId, labelId, newNumber, newString, newString, newTarget, putIntProp, putProp, removeChild, removeProp, replaceChild, replaceChildAfter, setDouble, setScope, setString, setType, toString, toStringTree |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FUNCTION_STATEMENT
public static final int FUNCTION_STATEMENT
- There are three types of functions that can be defined. The first
is a function statement. This is a function appearing as a top-level
statement (i.e., not nested inside some other statement) in either a
script or a function.
The second is a function expression, which is a function appearing in
an expression except for the third type, which is...
The third type is a function expression where the expression is the
top-level expression in an expression statement.
The three types of functions have different treatment and must be
distinguished.
- See Also:
- Constant Field Values
FUNCTION_EXPRESSION
public static final int FUNCTION_EXPRESSION
- See Also:
- Constant Field Values
FUNCTION_EXPRESSION_STATEMENT
public static final int FUNCTION_EXPRESSION_STATEMENT
- See Also:
- Constant Field Values
symbolTable
protected java.util.LinkedHashMap<java.lang.String,org.mozilla.javascript.Node.Symbol> symbolTable
FunctionNode
public FunctionNode(java.lang.String name)
getFunctionName
public java.lang.String getFunctionName()
requiresActivation
public boolean requiresActivation()
getIgnoreDynamicScope
public boolean getIgnoreDynamicScope()
isGenerator
public boolean isGenerator()
addResumptionPoint
public void addResumptionPoint(Node target)
getResumptionPoints
public java.util.ArrayList getResumptionPoints()
getLiveLocals
public java.util.HashMap getLiveLocals()
addLiveLocals
public void addLiveLocals(Node node,
int[] locals)
getFunctionType
public int getFunctionType()
splitScope
public static org.mozilla.javascript.Node.Scope splitScope(org.mozilla.javascript.Node.Scope scope)
joinScopes
public static void joinScopes(org.mozilla.javascript.Node.Scope source,
org.mozilla.javascript.Node.Scope dest)
setParent
public void setParent(org.mozilla.javascript.Node.Scope parent)
getParentScope
public org.mozilla.javascript.Node.Scope getParentScope()
getDefiningScope
public org.mozilla.javascript.Node.Scope getDefiningScope(java.lang.String name)
getSymbol
public org.mozilla.javascript.Node.Symbol getSymbol(java.lang.String name)
putSymbol
public void putSymbol(java.lang.String name,
org.mozilla.javascript.Node.Symbol symbol)
getSymbolTable
public java.util.Map<java.lang.String,org.mozilla.javascript.Node.Symbol> getSymbolTable()