Package jminusminus
Class JStatementExpression
java.lang.Object
jminusminus.JAST
jminusminus.JStatement
jminusminus.JStatementExpression
The AST node for an expression that appears as a statement. Only the expressions that have a
side-effect are valid statement expressions.
-
Field Summary
Fields inherited from class jminusminus.JAST
compilationUnit, line
-
Constructor Summary
ConstructorDescriptionJStatementExpression
(int line, JExpression expr) Constructs an AST node for a statement expression. -
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
-
Field Details
-
expr
The expression.
-
-
Constructor Details
-
JStatementExpression
Constructs an AST node for a statement expression.- Parameters:
line
- line in which the expression occurs in the source file.expr
- the expression.
-
-
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.
-