Package iota
Class IReturnStatement
java.lang.Object
iota.IAST
iota.IStatement
iota.IReturnStatement
The AST node for a return-statement. If the enclosing method is non-void, then there is a value to return, so we
keep track of the expression denoting that value and its type.
-
Field Summary
Fields inherited from class iota.IAST
compilationUnit, line
-
Constructor Summary
ConstructorsConstructorDescriptionIReturnStatement
(int line, IExpression expr) Constructs an AST node for a return-statement. -
Method Summary
Modifier and TypeMethodDescriptionPerforms second phase of 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 iota.IAST
line, preAnalyze
-
Constructor Details
-
IReturnStatement
Constructs an AST node for a return-statement.- Parameters:
line
- line in which the return-statement appears in the source file.expr
- the returned expression.
-
-
Method Details
-
analyze
Performs second phase of 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.
-