Add first part of IR Generator implementation
This commit is contained in:
parent
f059870e81
commit
dc50ce64eb
5 changed files with 238 additions and 1 deletions
|
@ -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::*;
|
||||
|
|
Reference in a new issue