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
-
Constructor Summary
ConstructorDescriptionJFieldDeclaration
(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) Declares the member names in the specified (class) context and generates the member headers in the partial class.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
Declares the member names in the specified (class) context and generates the member headers in the partial class.- Specified by:
preAnalyze
in interfaceJMember
- Parameters:
context
- class context in which names are resolved.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.
-