Package jminusminus
Class JTryStatement
java.lang.Object
jminusminus.JAST
jminusminus.JStatement
jminusminus.JTryStatement
The AST node for a try-catch-finally statement.
-
Field Summary
Fields inherited from class jminusminus.JAST
compilationUnit, line
-
Constructor Summary
ConstructorDescriptionJTryStatement
(int line, JBlock tryBlock, ArrayList<JFormalParameter> parameters, ArrayList<JBlock> catchBlocks, JBlock finallyBlock) Constructs an AST node for a try-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
-
JTryStatement
public JTryStatement(int line, JBlock tryBlock, ArrayList<JFormalParameter> parameters, ArrayList<JBlock> catchBlocks, JBlock finallyBlock) Constructs an AST node for a try-statement.- Parameters:
line
- line in which the while-statement occurs in the source file.tryBlock
- the try block.parameters
- the catch parameters.catchBlocks
- the catch blocks.finallyBlock
- the finally block.
-
-
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.
-