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

Node representing an expression evaluated as a statement. More...

#include <Compiler_AST.H>

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

Public Member Functions

 Compiler_Expr_Stmt (Compiler_Expr *value=nullptr, const Source_Span &semi={}) noexcept
 Constructs an expression 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

Compiler_Expr * expr = nullptr
 The expression being evaluated.
 
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.
 

Detailed Description

Node representing an expression evaluated as a statement.

Typically terminated by a semicolon.

Definition at line 872 of file Compiler_AST.H.

Constructor & Destructor Documentation

◆ Compiler_Expr_Stmt()

Aleph::Compiler_Expr_Stmt::Compiler_Expr_Stmt ( Compiler_Expr *  value = nullptr,
const Source_Span &  semi = {} 
)
inlinenoexcept

Constructs an expression statement.

Definition at line 878 of file Compiler_AST.H.

Member Data Documentation

◆ expr

Compiler_Expr* Aleph::Compiler_Expr_Stmt::expr = nullptr

The expression being evaluated.

Definition at line 874 of file Compiler_AST.H.

Referenced by Aleph::Compiler_Typed_Semantic_Analyzer::analyze_stmt().

◆ semicolon_span

Source_Span Aleph::Compiler_Expr_Stmt::semicolon_span

Location of the trailing ‘’;'`.

Definition at line 875 of file Compiler_AST.H.


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