Pop the annotation symbol table and restore it to the function scope's annotation_block
(&mut self)
| 877 | |
| 878 | /// Pop the annotation symbol table and restore it to the function scope's annotation_block |
| 879 | fn pop_annotation_symbol_table(&mut self) { |
| 880 | let annotation_table = self.symbol_table_stack.pop().expect("compiler bug"); |
| 881 | let current_table = self |
| 882 | .symbol_table_stack |
| 883 | .last_mut() |
| 884 | .expect("no current symbol table"); |
| 885 | |
| 886 | // Restore to the next sub_table (function scope) where it came from |
| 887 | let next_idx = current_table.next_sub_table; |
| 888 | if next_idx < current_table.sub_tables.len() { |
| 889 | current_table.sub_tables[next_idx].annotation_block = Some(Box::new(annotation_table)); |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | /// Pop the current symbol table off the stack |
| 894 | fn pop_symbol_table(&mut self) -> SymbolTable { |
no test coverage detected