|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Node representing a literal value. More...
#include <Compiler_AST.H>
Public Member Functions | |
| Compiler_Literal_Expr (const Compiler_Expr_Kind k=Compiler_Expr_Kind::Invalid, std::string value="", const Source_Span &sp={}, const bool bool_val=false) noexcept | |
| Constructs a literal expression. | |
Public Member Functions inherited from Aleph::Compiler_Expr | |
| Compiler_Expr (const Compiler_Expr_Kind k=Compiler_Expr_Kind::Invalid, const Source_Span &sp={}) noexcept | |
| Constructs an expression 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 | |
| std::string | lexeme |
| Raw source spelling of the literal. | |
| bool | bool_value = false |
| Boolean value (meaningful only for Bool_Literal). | |
Public Attributes inherited from Aleph::Compiler_Expr | |
| Compiler_Expr_Kind | kind = Compiler_Expr_Kind::Invalid |
| Specific expression type. | |
Public Attributes inherited from Aleph::Compiler_Ast_Node | |
| Source_Span | span |
| Source region covered by this node. | |
Node representing a literal value.
Supports integer, string, char, and boolean literals.
Definition at line 756 of file Compiler_AST.H.
|
inlinenoexcept |
Constructs a literal expression.
Definition at line 762 of file Compiler_AST.H.
Boolean value (meaningful only for Bool_Literal).
Definition at line 759 of file Compiler_AST.H.
| std::string Aleph::Compiler_Literal_Expr::lexeme |
Raw source spelling of the literal.
Definition at line 758 of file Compiler_AST.H.
Referenced by Aleph::Compiler_Ast_Detail::dump_expr().