|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Node representing a conditional branch. More...
#include <Compiler_AST.H>
Public Member Functions | |
| Compiler_If_Stmt (const Source_Span &if_kw={}, Compiler_Expr *cond=nullptr, Compiler_Stmt *then_stmt=nullptr, const Source_Span &else_kw={}, Compiler_Stmt *else_stmt=nullptr) noexcept | |
| Constructs an if-else 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 | if_span |
Location of the if keyword. | |
| Compiler_Expr * | condition = nullptr |
| Boolean expression governing the branch. | |
| Compiler_Stmt * | then_branch = nullptr |
| Statement executed if true. | |
| Source_Span | else_span |
Location of the else keyword (if present). | |
| Compiler_Stmt * | else_branch = nullptr |
| Statement executed if false (optional). | |
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 conditional branch.
Example: if (x > 0) { ... } else { ... }.
Definition at line 962 of file Compiler_AST.H.
|
inlinenoexcept |
Constructs an if-else statement.
Definition at line 971 of file Compiler_AST.H.
| Compiler_Expr* Aleph::Compiler_If_Stmt::condition = nullptr |
Boolean expression governing the branch.
Definition at line 965 of file Compiler_AST.H.
| Compiler_Stmt* Aleph::Compiler_If_Stmt::else_branch = nullptr |
Statement executed if false (optional).
Definition at line 968 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_If_Stmt::else_span |
Location of the else keyword (if present).
Definition at line 967 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_If_Stmt::if_span |
Location of the if keyword.
Definition at line 964 of file Compiler_AST.H.
| Compiler_Stmt* Aleph::Compiler_If_Stmt::then_branch = nullptr |
Statement executed if true.
Definition at line 966 of file Compiler_AST.H.