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

Method new

crates/codegen/src/symboltable.rs:82–102  ·  view source on GitHub ↗
(name: String, typ: CompilerScope, line_number: u32, is_nested: bool)

Source from the content-addressed store, hash-verified

80
81impl SymbolTable {
82 fn new(name: String, typ: CompilerScope, line_number: u32, is_nested: bool) -> Self {
83 Self {
84 name,
85 typ,
86 line_number,
87 is_nested,
88 symbols: IndexMap::default(),
89 sub_tables: vec![],
90 next_sub_table: 0,
91 varnames: Vec::new(),
92 needs_class_closure: false,
93 needs_classdict: false,
94 can_see_class_scope: false,
95 is_generator: false,
96 comp_inlined: false,
97 annotation_block: None,
98 has_conditional_annotations: false,
99 future_annotations: false,
100 mangled_names: None,
101 }
102 }
103
104 pub fn scan_program(
105 program: &ast::ModModule,

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
to_ownedMethod · 0.45
enter_scopeMethod · 0.45

Tested by

no test coverage detected