MCPcopy Index your code
hub / github.com/RustPython/RustPython / finish

Method finish

crates/codegen/src/symboltable.rs:1008–1017  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

1006 }
1007
1008 fn finish(mut self) -> Result<SymbolTable, SymbolTableError> {
1009 assert_eq!(self.tables.len(), 1);
1010 let mut symbol_table = self.tables.pop().unwrap();
1011 // Save varnames for the top-level module scope
1012 symbol_table.varnames = self.current_varnames;
1013 // Propagate future_annotations to the symbol table
1014 symbol_table.future_annotations = self.future_annotations;
1015 analyze_symbol_table(&mut symbol_table)?;
1016 Ok(symbol_table)
1017 }
1018
1019 fn enter_scope(&mut self, name: &str, typ: CompilerScope, line_number: u32) {
1020 let is_nested = self

Callers 12

compileFunction · 0.45
compile_symtableFunction · 0.45
fmtMethod · 0.45
hash_iterMethod · 0.45
keyed_hashFunction · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
fmtMethod · 0.45
scan_programMethod · 0.45
scan_exprMethod · 0.45
fmtMethod · 0.45

Calls 3

analyze_symbol_tableFunction · 0.85
unwrapMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected