Package jminusminus
Class JSwitchStatement
java.lang.Object
jminusminus.JAST
jminusminus.JStatement
jminusminus.JSwitchStatement
The AST node for a switch-statement.
-
Field Summary
Fields inherited from class jminusminus.JAST
compilationUnit, line
-
Constructor Summary
ConstructorDescriptionJSwitchStatement
(int line, JExpression condition, ArrayList<SwitchStatementGroup> stmtGroup) Constructs an AST node for a switch-statement. -
Method Summary
Modifier and TypeMethodDescriptionPerforms semantic analysis on this AST and returns the (possibly modified) AST.void
Performs code generation for 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
-
JSwitchStatement
Constructs an AST node for a switch-statement.- Parameters:
line
- line in which the switch-statement occurs in the source file.condition
- test expression.stmtGroup
- list of statement groups.
-
-
Method Details
-
analyze
Performs semantic analysis on this AST and returns the (possibly modified) AST. -
codegen
Performs code generation for this AST. -
toJSON
Stores information about this AST in JSON format.
-