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

Node representing a complete translation unit or module. More...

#include <Compiler_AST.H>

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

Public Member Functions

 Compiler_Module (const Source_Span &sp={}) noexcept
 Constructs a module node.
 
- 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 source_name
 User-facing source name that produced the module.
 
DynArray< Compiler_Import_Decl * > imports
 Top-level import declarations.
 
DynArray< Compiler_Type_Decl * > type_declarations
 Top-level type declarations.
 
DynArray< Compiler_Function_Decl * > functions
 Top-level function definitions.
 
DynArray< Compiler_Stmt * > statements
 Optional top-level code.
 
- Public Attributes inherited from Aleph::Compiler_Ast_Node
Source_Span span
 Source region covered by this node.
 

Detailed Description

Node representing a complete translation unit or module.

Aggregates one parsed source file, including top-level imports, type declarations, functions, and statements.

Definition at line 1088 of file Compiler_AST.H.

Constructor & Destructor Documentation

◆ Compiler_Module()

Aleph::Compiler_Module::Compiler_Module ( const Source_Span &  sp = {})
inlineexplicitnoexcept

Constructs a module node.

Definition at line 1097 of file Compiler_AST.H.

Member Data Documentation

◆ functions

◆ imports

DynArray<Compiler_Import_Decl *> Aleph::Compiler_Module::imports

Top-level import declarations.

Definition at line 1091 of file Compiler_AST.H.

Referenced by Aleph::compiler_dump_module().

◆ source_name

std::string Aleph::Compiler_Module::source_name

◆ statements

◆ type_declarations


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