∅:D[
5.394] → [
3.599:1092]
B:BD[
3.599] → [
3.599:1092]
pub struct SymbolId(usize, usize);
/// A symbol table (that can only grow!)
pub struct SymbolTable(usize, Vec<Box<str>>);
impl Default for SymbolTable {
fn default() -> Self {
static SYMBOL_TABLE_COUNTER: OnceLock<AtomicUsize> = OnceLock::new();
let counter = SYMBOL_TABLE_COUNTER.get_or_init(|| AtomicUsize::new(0));
let id = counter.fetch_add(1, Ordering::SeqCst);
// Start off with room for 100 symbols
Self(id, Vec::with_capacity(100))
}
}
pub struct SymbolId(Spur);
/// A wrapper around a [`Rodeo`]
#[derive(Default)]
pub struct SymbolTable(Rodeo);