|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Node representing a return from the current function. More...
#include <Compiler_AST.H>
Public Member Functions | |
| Compiler_Return_Stmt (const Source_Span &kw={}, Compiler_Expr *expr=nullptr, const Source_Span &semi={}) noexcept | |
| Constructs a return statement. | |
Public Member Functions inherited from Aleph::Compiler_Stmt | |
| Compiler_Stmt (const Compiler_Stmt_Kind k=Compiler_Stmt_Kind::Invalid, const Source_Span &sp={}) noexcept | |
| Constructs a statement base. | |
Public Member Functions inherited from Aleph::Compiler_Ast_Node | |
| Compiler_Ast_Node (const Source_Span &sp={}) noexcept | |
| Constructs a node with an optional span. | |
| virtual | ~Compiler_Ast_Node () noexcept=default |
| Virtual destructor to ensure proper cleanup of derived nodes. | |
Public Attributes | |
| Source_Span | keyword_span |
Location of the return keyword. | |
| Compiler_Expr * | value = nullptr |
| Optional value being returned. | |
| Source_Span | semicolon_span |
| Location of the trailing ‘’;'`. | |
Public Attributes inherited from Aleph::Compiler_Stmt | |
| Compiler_Stmt_Kind | kind = Compiler_Stmt_Kind::Invalid |
| Specific statement type. | |
Public Attributes inherited from Aleph::Compiler_Ast_Node | |
| Source_Span | span |
| Source region covered by this node. | |
Node representing a return from the current function.
Example: return x + 1;.
Definition at line 924 of file Compiler_AST.H.
|
inlinenoexcept |
Constructs a return statement.
Definition at line 931 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_Return_Stmt::keyword_span |
Location of the return keyword.
Definition at line 926 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_Return_Stmt::semicolon_span |
Location of the trailing ‘’;'`.
Definition at line 928 of file Compiler_AST.H.
| Compiler_Expr* Aleph::Compiler_Return_Stmt::value = nullptr |
Optional value being returned.
Definition at line 927 of file Compiler_AST.H.
Referenced by Aleph::Compiler_Typed_Semantic_Analyzer::analyze_stmt().