pub struct Context {
pub variables: HashMap<String, String>,
pub functions: HashMap<String, (Vec<String>, Vec<Stmt>)>,
}Expand description
Stores the runtime context for the interpreter, including variables and user-defined functions.
Fields§
§variables: HashMap<String, String>A map of variable names to their string values.
functions: HashMap<String, (Vec<String>, Vec<Stmt>)>A map of function names to their parameter list and body.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more