diff --git a/src/ast/compiler/binder.rs b/src/ast/compiler/binder.rs index 6556d18..bd0709f 100644 --- a/src/ast/compiler/binder.rs +++ b/src/ast/compiler/binder.rs @@ -9,22 +9,22 @@ use std::collections::HashMap; use std::rc::Rc; #[derive(Debug, Clone)] -struct LocalInfo { - addr: Address, - identity: Identity, +pub struct LocalInfo { + pub addr: Address, + pub identity: Identity, // Note: Binder doesn't strictly need the type anymore, // but it might be useful for built-ins during resolution. // For now we keep it as Any or Unknown. - _ty: StaticType, + pub _ty: StaticType, } #[derive(Debug, Clone)] -struct CompilerScope { - locals: HashMap, +pub struct CompilerScope { + pub locals: HashMap, } impl CompilerScope { - fn new() -> Self { + pub fn new() -> Self { Self { locals: HashMap::new(), } @@ -41,7 +41,11 @@ struct FunctionCompiler { } impl FunctionCompiler { - fn new(fixed_scope_idx: i32, identity: Identity, is_root: bool) -> Self { + fn new( + fixed_scope_idx: i32, + identity: Identity, + is_root: bool, + ) -> Self { Self { identity, scopes: vec![CompilerScope::new()],