Lexer test mode works

This commit is contained in:
2024-08-04 23:24:32 +02:00
parent 9d35ba8040
commit 11951ede43
36 changed files with 687 additions and 115 deletions

View File

@@ -24,6 +24,10 @@ impl<T> IdStore<T> {
let id64 = id.into();
if tbl_g.contains_key(&id64) { Some(IdRecord(id64, tbl_g)) } else { None }
}
pub fn is_empty(&self) -> bool { self.len() == 0 }
pub fn len(&self) -> usize {
self.table.get().map(|t| t.lock().unwrap().len()).unwrap_or(0)
}
}
impl<T> Default for IdStore<T> {