assembler: we failing DSA with this one
This commit is contained in:
@@ -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()),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user