Package jminusminus
Class JAST
java.lang.Object
jminusminus.JAST
- Direct Known Subclasses:
- JClassDeclaration,- JCompilationUnit,- JFieldDeclaration,- JFormalParameter,- JInterfaceDeclaration,- JMethodDeclaration,- JStatement,- JVariableDeclarator
JAST is the abstract superclass of all nodes in the abstract syntax tree (AST).
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic JCompilationUnitCurrent compilation unit (set in JCompilationUnit()).protected intLine in which the source for the AST was found.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedJAST(int line) Constructs an AST node the given its line number in the source file.
- 
Method SummaryModifier and TypeMethodDescriptionabstract JASTPerforms semantic analysis on this AST and returns the (possibly modified) AST.abstract voidPerforms code generation for this AST.intline()Returns the line in which the source for the AST was found.voidpartialCodegen(Context context, CLEmitter partial) Generates a partial class for a type, reflecting only the member information required to do analysis.voidtoJSON(JSONElement json) Stores information about this AST in JSON format.static StringUnescapes the escaped characters in the specified string and returns the unescaped string.
- 
Field Details- 
compilationUnitCurrent compilation unit (set in JCompilationUnit()).
- 
lineprotected int lineLine in which the source for the AST was found.
 
- 
- 
Constructor Details- 
JASTprotected JAST(int line) Constructs an AST node the given its line number in the source file.- Parameters:
- line- line in which the source for the AST was found.
 
 
- 
- 
Method Details- 
linepublic int line()Returns the line in which the source for the AST was found.- Returns:
- the line in which the source for the AST was found.
 
- 
analyzePerforms semantic analysis on this AST and returns the (possibly modified) AST.- Parameters:
- context- the environment (scope) in which code is analyzed.
- Returns:
- the (possibly modified) AST.
 
- 
partialCodegenGenerates a partial class for a type, reflecting only the member information required to do analysis.- Parameters:
- context- the parent (class) context.
- partial- the code emitter.
 
- 
codegenPerforms code generation for this AST.- Parameters:
- output- the code emitter.
 
- 
toJSONStores information about this AST in JSON format.- Parameters:
- json- the JSON emitter.
 
- 
unescapeUnescapes the escaped characters in the specified string and returns the unescaped string.- Parameters:
- s- string to unescape.
- Returns:
- the unescaped string.
 
 
-