assembler: we failing DSA with this one

This commit is contained in:
2025-06-25 14:31:53 +01:00
parent 9232f2ccab
commit 20a7d42adb
14 changed files with 508 additions and 38 deletions
+21
View File
@@ -0,0 +1,21 @@
//! This module contains the global asembler context to be passed to functions that need
//! it.
use std::sync::RwLock;
use crate::{model::module_registry::ModuleRegistry, symtab::SymbolTable};
/// Global state to be passed around.
pub struct AssemblerContext {
pub symbol_table: RwLock<SymbolTable>,
pub module_registry: RwLock<ModuleRegistry>,
}
impl AssemblerContext {
pub fn new() -> Self {
Self {
symbol_table: RwLock::new(SymbolTable::new()),
module_registry: RwLock::new(ModuleRegistry::new()),
}
}
}