Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Compiler_Literal_Expr Struct Referencefinal

Node representing a literal value. More...

#include <Compiler_AST.H>

Inheritance diagram for Aleph::Compiler_Literal_Expr:
[legend]
Collaboration diagram for Aleph::Compiler_Literal_Expr:
[legend]

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.
 

Detailed Description

Node representing a literal value.

Supports integer, string, char, and boolean literals.

Definition at line 756 of file Compiler_AST.H.

Constructor & Destructor Documentation

◆ Compiler_Literal_Expr()

Aleph::Compiler_Literal_Expr::Compiler_Literal_Expr ( const Compiler_Expr_Kind  k = Compiler_Expr_Kind::Invalid,
std::string  value = "",
const Source_Span &  sp = {},
const bool  bool_val = false 
)
inlinenoexcept

Constructs a literal expression.

Definition at line 762 of file Compiler_AST.H.

Member Data Documentation

◆ bool_value

bool Aleph::Compiler_Literal_Expr::bool_value = false

Boolean value (meaningful only for Bool_Literal).

Definition at line 759 of file Compiler_AST.H.

◆ lexeme

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().


The documentation for this struct was generated from the following file: