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

Method scan_expr

crates/codegen/src/symboltable.rs:113–120  ·  view source on GitHub ↗
(
        expr: &ast::ModExpression,
        source_file: SourceFile,
    )

Source from the content-addressed store, hash-verified

111 }
112
113 pub fn scan_expr(
114 expr: &ast::ModExpression,
115 source_file: SourceFile,
116 ) -> SymbolTableResult<Self> {
117 let mut builder = SymbolTableBuilder::new(source_file);
118 builder.scan_expression(expr.body.as_ref(), ExpressionContext::Load)?;
119 builder.finish()
120 }
121
122 pub fn lookup(&self, name: &str) -> Option<&Symbol> {
123 self.symbols.get(name)

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
scan_expressionMethod · 0.80
as_refMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected