|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScriptCompiler
Compiler represents the current state of a compiler and all appropriate transitions and modifications that can be made within it. The methods here begin and end a class for a given compile run, begin and end methods for the script being compiled, set line number information, and generate code for all the basic operations necessary for a script to run. The intent of this interface is to provide a library-neutral set of functions for compiling a given script using any backend or any output format.
Method Summary | |
---|---|
void |
endScript(boolean generateRun,
boolean generateLoad,
boolean generateMain)
End compilation for the current script, closing all context and structures used for the compilation. |
MethodCompiler |
startMethod(java.lang.String friendlyName,
CompilerCallback argsHandler,
StaticScope scope,
ASTInspector inspector)
Begin compilation for a method that has the specified number of local variables. |
void |
startScript(StaticScope scope)
Begin compilation for a script, preparing all necessary context and code to support this script's compiled representation. |
Method Detail |
---|
void startScript(StaticScope scope)
void endScript(boolean generateRun, boolean generateLoad, boolean generateMain)
MethodCompiler startMethod(java.lang.String friendlyName, CompilerCallback argsHandler, StaticScope scope, ASTInspector inspector)
friendlyName
- The outward user-readable name of the method. A unique name will be generated based on this.arity
- The arity of the method's argument listlocalVarCount
- The number of local variables that will be used by the method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |