public final class JsProgram extends JsNode
Constructor and Description |
---|
JsProgram() |
JsProgram(CorrelationFactory correlator)
Constructs a JavaScript program object.
|
Modifier and Type | Method and Description |
---|---|
SourceInfo |
createSourceInfo(int lineNumber,
String location) |
SourceInfo |
createSourceInfoSynthetic(Class<?> caller) |
void |
disallowInlining(JsFunction function) |
JsProgramFragment |
getFragment(int fragment) |
JsBlock |
getFragmentBlock(int fragment) |
int |
getFragmentCount() |
JsBlock |
getGlobalBlock()
Gets the one and only global block.
|
JsName |
getIndexedField(String name) |
JsFunction |
getIndexedFunction(String name) |
NodeKind |
getKind() |
JsScope |
getObjectScope() |
JsScope |
getScope()
Gets the top level scope.
|
boolean |
isIndexedFunction(JsFunction func) |
boolean |
isInliningAllowed(JsFunction function) |
void |
setFragmentCount(int fragments) |
void |
setIndexedFields(Map<String,JsName> indexedFields) |
void |
setIndexedFunctions(Map<String,JsFunction> indexedFunctions) |
void |
traverse(JsVisitor v,
JsContext ctx)
Causes this object to have the visitor visit itself and its children.
|
getSourceInfo, setSourceInfo, toSource, toSource, toString
public JsProgram()
public JsProgram(CorrelationFactory correlator)
public SourceInfo createSourceInfo(int lineNumber, String location)
public SourceInfo createSourceInfoSynthetic(Class<?> caller)
public JsProgramFragment getFragment(int fragment)
public JsBlock getFragmentBlock(int fragment)
public int getFragmentCount()
public JsBlock getGlobalBlock()
public JsFunction getIndexedFunction(String name)
public boolean isIndexedFunction(JsFunction func)
public JsScope getObjectScope()
public JsScope getScope()
public void setFragmentCount(int fragments)
public void setIndexedFunctions(Map<String,JsFunction> indexedFunctions)
public void disallowInlining(JsFunction function)
public boolean isInliningAllowed(JsFunction function)
public void traverse(JsVisitor v, JsContext ctx)
JsVisitable
v
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.