mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 18:52:58 +03:00
Add stub structs & functions to ST
This commit is contained in:
parent
393d9bc3d0
commit
878bbc8f35
@ -72,4 +72,16 @@ impl<'a> ProgramVisitor<'a> for SymbolTableCreator<'a> {
|
||||
self.handler.emit_err(err);
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_stub(&mut self, input: &'a Stub) {
|
||||
input.functions.iter().for_each(|(_, c)| (self.visit_function_stub(c)));
|
||||
|
||||
input.structs.iter().for_each(|(_, c)| (self.visit_struct(c)));
|
||||
}
|
||||
|
||||
fn visit_function_stub(&mut self, input: &'a FunctionStub) {
|
||||
if let Err(err) = self.symbol_table.insert_fn(input.name(), &Function::from(input.clone())) {
|
||||
self.handler.emit_err(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user