|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Node representing a local variable binding. More...
#include <Compiler_AST.H>
Public Member Functions | |
| Compiler_Let_Stmt (const Source_Span &kw={}, std::string value="", const Source_Span &name_sp={}, const Source_Span &colon_sp={}, Compiler_Type_Expr *annot=nullptr, Compiler_Expr *init=nullptr, const Source_Span &semi={}) noexcept | |
| Constructs a variable binding 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 let keyword. | |
| std::string | name |
| Name of the bound variable. | |
| Source_Span | name_span |
| Location of the variable name. | |
| Source_Span | colon_span |
Location of the optional : before the type annotation. | |
| Compiler_Type_Expr * | annotation = nullptr |
| Optional declared binding type. | |
| Compiler_Expr * | initializer = nullptr |
| Optional initialization expression. | |
| 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 local variable binding.
Example: let x = 10;.
Definition at line 889 of file Compiler_AST.H.
|
inlinenoexcept |
Constructs a variable binding statement.
Definition at line 900 of file Compiler_AST.H.
| Compiler_Type_Expr* Aleph::Compiler_Let_Stmt::annotation = nullptr |
Optional declared binding type.
Definition at line 895 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_Let_Stmt::colon_span |
Location of the optional : before the type annotation.
Definition at line 894 of file Compiler_AST.H.
| Compiler_Expr* Aleph::Compiler_Let_Stmt::initializer = nullptr |
Optional initialization expression.
Definition at line 896 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_Let_Stmt::keyword_span |
Location of the let keyword.
Definition at line 891 of file Compiler_AST.H.
| std::string Aleph::Compiler_Let_Stmt::name |
Name of the bound variable.
Definition at line 892 of file Compiler_AST.H.
Referenced by Aleph::Compiler_Ast_Detail::dump_stmt().
| Source_Span Aleph::Compiler_Let_Stmt::name_span |
Location of the variable name.
Definition at line 893 of file Compiler_AST.H.
| Source_Span Aleph::Compiler_Let_Stmt::semicolon_span |
Location of the trailing ‘’;'`.
Definition at line 897 of file Compiler_AST.H.