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

Method compile_match

crates/codegen/src/compile.rs:6872–6882  ·  view source on GitHub ↗
(
        &mut self,
        subject: &ast::Expr,
        cases: &[ast::MatchCase],
    )

Source from the content-addressed store, hash-verified

6870 }
6871
6872 fn compile_match(
6873 &mut self,
6874 subject: &ast::Expr,
6875 cases: &[ast::MatchCase],
6876 ) -> CompileResult<()> {
6877 self.enter_conditional_block();
6878 let mut pattern_context = PatternContext::new();
6879 self.compile_match_inner(subject, cases, &mut pattern_context)?;
6880 self.leave_conditional_block();
6881 Ok(())
6882 }
6883
6884 /// [CPython `compiler_addcompare`](https://github.com/python/cpython/blob/627894459a84be3488a1789919679c997056a03c/Python/compile.c#L2880-L2924)
6885 fn compile_addcompare(&mut self, op: &ast::CmpOp) {

Callers 1

compile_statementMethod · 0.80

Calls 4

newFunction · 0.85
compile_match_innerMethod · 0.80

Tested by

no test coverage detected