1
0
Fork 0

Add first part of IR Generator implementation

This commit is contained in:
Vili Sinervä 2025-02-05 17:16:17 +02:00
parent f059870e81
commit dc50ce64eb
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
5 changed files with 238 additions and 1 deletions

View file

@ -37,6 +37,14 @@ impl<'source, T> SymTab<'source, T> {
}
}
impl<'source, T> SymTab<'source, T> {
pub fn new() -> SymTab<'source, T> {
SymTab {
tables: vec![HashMap::new()],
}
}
}
impl<'source> SymTab<'source, Type> {
pub fn new_type_table() -> SymTab<'source, Type> {
use Type::*;