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

Function analyze_symbol_table

crates/codegen/src/symboltable.rs:271–277  ·  view source on GitHub ↗

Perform some sort of analysis on nonlocals, globals etc.. See also: https://github.com/python/cpython/blob/main/Python/symtable.c#L410 */

(symbol_table: &mut SymbolTable)

Source from the content-addressed store, hash-verified

269 See also: https://github.com/python/cpython/blob/main/Python/symtable.c#L410
270*/
271fn analyze_symbol_table(symbol_table: &mut SymbolTable) -> SymbolTableResult {
272 let mut analyzer = SymbolTableAnalyzer::default();
273 // Discard the newfree set at the top level - it's only needed for propagation
274 // Pass None for class_entry at top level
275 let _newfree = analyzer.analyze_symbol_table(symbol_table, None)?;
276 Ok(())
277}
278
279/* Drop __class__ and __classdict__ from free variables in class scope
280 and set the appropriate flags. Equivalent to CPython's drop_class_free().

Callers 1

finishMethod · 0.85

Calls 1

analyze_symbol_tableMethod · 0.80

Tested by

no test coverage detected