Package jminusminus
Class JFieldDeclaration
java.lang.Object
jminusminus.JAST
jminusminus.JFieldDeclaration
- All Implemented Interfaces:
JMember
The AST node for a field declaration.
-
Field Summary
Fields inherited from class jminusminus.JAST
compilationUnit, line
Fields inherited from interface jminusminus.JMember
enclosingStatement
-
Constructor Summary
ConstructorsConstructorDescriptionJFieldDeclaration
(int line, ArrayList<String> mods, ArrayList<JVariableDeclarator> decls) Constructs an AST node for a field declaration. -
Method Summary
Modifier and TypeMethodDescriptionPerforms semantic analysis on this AST and returns the (possibly modified) AST.void
Performs code generation for this AST.void
codegenInitializations
(CLEmitter output) Generates code for the field initializations.mods()
Returns the list of modifiers.void
preAnalyze
(Context context, CLEmitter partial) Performs first phase of semantic analysis on this AST.void
toJSON
(JSONElement json) Stores information about this AST in JSON format.Methods inherited from class jminusminus.JAST
line, partialCodegen, unescape
-
Constructor Details
-
JFieldDeclaration
Constructs an AST node for a field declaration.- Parameters:
line
- line in which the variable declaration occurs in the source file.mods
- field modifiers.decls
- variable declarators.
-
-
Method Details
-
mods
Returns the list of modifiers.- Returns:
- the list of modifiers.
-
preAnalyze
Performs first phase of semantic analysis on this AST.- Specified by:
preAnalyze
in interfaceJMember
- Overrides:
preAnalyze
in classJAST
- Parameters:
context
- the environment (scope) in which code is pre-analyzed.partial
- the code emitter.
-
analyze
Performs semantic analysis on this AST and returns the (possibly modified) AST. -
codegen
Performs code generation for this AST. -
codegenInitializations
Generates code for the field initializations.- Parameters:
output
- the code emitter.
-
toJSON
Stores information about this AST in JSON format.
-