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:
@@ -9,7 +9,7 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::rc::Rc;
|
||||
|
||||
use crate::ast::compiler::bound_nodes::{
|
||||
use crate::ast::nodes::{
|
||||
Address, AnalyzedNode, ExecNode, GlobalAnalyzedRegistry, GlobalFunctionRegistry, GlobalIdx,
|
||||
LambdaBinding, Node, NodeKind, VirtualId,
|
||||
};
|
||||
@@ -93,7 +93,7 @@ struct EnvFunctionRegistry {
|
||||
}
|
||||
|
||||
impl FunctionRegistry for EnvFunctionRegistry {
|
||||
fn resolve(&self, addr: Address<VirtualId>) -> Option<Rc<Node<crate::ast::compiler::bound_nodes::AnalyzedPhase>>> {
|
||||
fn resolve(&self, addr: Address<VirtualId>) -> Option<Rc<Node<crate::ast::nodes::AnalyzedPhase>>> {
|
||||
if let Address::Global(idx) = addr {
|
||||
self.analyzed_registry.borrow().get(&idx).cloned()
|
||||
} else {
|
||||
@@ -722,7 +722,7 @@ impl Environment {
|
||||
let optimization = self.optimization;
|
||||
|
||||
let compiler = Rc::new(
|
||||
move |func_template: Rc<Node<crate::ast::compiler::bound_nodes::AnalyzedPhase>>,
|
||||
move |func_template: Rc<Node<crate::ast::nodes::AnalyzedPhase>>,
|
||||
arg_types: &[StaticType]|
|
||||
-> Result<(Value, StaticType), String> {
|
||||
let mut diag = Diagnostics::new();
|
||||
|
||||
Reference in New Issue
Block a user