use lazy_static::lazy_static;
use serde_derive::{Deserialize, Serialize};
use std::{collections::HashMap, sync::Mutex};
use crate::expr::{ScopeType, ReiType};
pub type Identifier = String;
#[derive(Debug, Serialize)]
pub struct ScopeTable {
scope_type: ScopeType,
symbols: HashMap<Identifier, ReiType>,
inner_scopes: Vec<ScopeTable>,
}
impl ScopeTable {
pub fn new(
scope_type: ScopeType,
symbols: HashMap<Identifier, ReiType>,
inner_scopes: Vec<ScopeTable>,
) -> Self {
Self {
scope_type,
symbols,
inner_scopes,
}
}
}