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

Node representing an expression explicitly wrapped in parentheses. More...

#include <Compiler_AST.H>

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

Public Member Functions

 Compiler_Grouping_Expr (Compiler_Expr *expr=nullptr, const Source_Span &lparen={}, const Source_Span &rparen={}) noexcept
 Constructs a grouping 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

Compiler_Expr * inner = nullptr
 The expression inside parentheses.
 
Source_Span lparen_span
 Location of the opening ‘’('`.
 
Source_Span rparen_span
 Location of the closing ‘’)'`.
 
- 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 an expression explicitly wrapped in parentheses.

Preserves user-defined grouping which might be lost after parsing into a precedence-based tree.

Definition at line 775 of file Compiler_AST.H.

Constructor & Destructor Documentation

◆ Compiler_Grouping_Expr()

Aleph::Compiler_Grouping_Expr::Compiler_Grouping_Expr ( Compiler_Expr *  expr = nullptr,
const Source_Span &  lparen = {},
const Source_Span &  rparen = {} 
)
inlinenoexcept

Constructs a grouping expression.

Definition at line 782 of file Compiler_AST.H.

Member Data Documentation

◆ inner

Compiler_Expr* Aleph::Compiler_Grouping_Expr::inner = nullptr

The expression inside parentheses.

Definition at line 777 of file Compiler_AST.H.

◆ lparen_span

Source_Span Aleph::Compiler_Grouping_Expr::lparen_span

Location of the opening ‘’('`.

Definition at line 778 of file Compiler_AST.H.

◆ rparen_span

Source_Span Aleph::Compiler_Grouping_Expr::rparen_span

Location of the closing ‘’)'`.

Definition at line 779 of file Compiler_AST.H.


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