Refactor: Move compiler node definitions to src/ast/nodes

The `bound_nodes.rs` file has been removed and its contents have been
moved to `src/ast/nodes.rs`. This consolidates all AST node definitions
into a single module, improving organization and maintainability.

The `compiler` modules now import these definitions from
`crate::ast::nodes` instead of `crate::ast::compiler::bound_nodes`.
This commit is contained in:
2026-03-22 17:58:49 +01:00
parent 49ad76e7c3
commit 1cbc656554
20 changed files with 580 additions and 572 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
use crate::ast::compiler::bound_nodes::{
use crate::ast::nodes::{
Address, AnalyzedNode, AssignBinding, GlobalAnalyzedRegistry,
IdentifierBinding, LambdaBinding, Node, NodeKind, UpvalueIdx,
};
@@ -756,7 +756,7 @@ impl Optimizer {
}
/// Extracts the address from a Def pattern node (when it's a simple Identifier with Declaration binding).
fn extract_def_addr(pattern: &AnalyzedNode) -> Option<Address<crate::ast::compiler::bound_nodes::VirtualId>> {
fn extract_def_addr(pattern: &AnalyzedNode) -> Option<Address<crate::ast::nodes::VirtualId>> {
if let NodeKind::Identifier {
binding: IdentifierBinding::Declaration { addr, .. },
..
+1 -1
View File
@@ -1,4 +1,4 @@
use crate::ast::compiler::bound_nodes::{
use crate::ast::nodes::{
Address, AnalyzedNode, IdentifierBinding, Node, NodeKind, NodeMetrics,
};
use crate::ast::types::{Purity, RecordLayout, StaticType, Value};
+1 -1
View File
@@ -1,4 +1,4 @@
use crate::ast::compiler::bound_nodes::{
use crate::ast::nodes::{
Address, AnalyzedNode, IdentifierBinding, NodeKind, VirtualId,
};
use crate::ast::types::{Purity, Value};
@@ -1,4 +1,4 @@
use crate::ast::compiler::bound_nodes::{
use crate::ast::nodes::{
Address, AnalyzedNode, AssignBinding, IdentifierBinding,
LambdaBinding, Node, NodeKind, UpvalueIdx, VirtualId,
};
+1 -1
View File
@@ -1,4 +1,4 @@
use crate::ast::compiler::bound_nodes::{
use crate::ast::nodes::{
Address, AnalyzedNode, GlobalIdx, IdentifierBinding,
NodeKind, VirtualId,
};