add context
This commit is contained in:
21
src/context.rs
Normal file
21
src/context.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user