21 lines
384 B
Rust
21 lines
384 B
Rust
use std::collections::HashMap;
|
|
|
|
#[derive(Debug)]
|
|
pub struct Context {
|
|
ptr: isize,
|
|
stack: Vec<isize>,
|
|
label_map: HashMap<isize, isize>,
|
|
mem_map: HashMap<isize, isize>,
|
|
}
|
|
|
|
impl Context {
|
|
|
|
pub fn new() -> Self {
|
|
Self {
|
|
ptr: 0,
|
|
stack: vec![],
|
|
label_map: HashMap::new(),
|
|
mem_map: HashMap::new(),
|
|
}
|
|
}
|
|
} |