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

Method compile_pattern_subpattern

crates/codegen/src/compile.rs:6138–6152  ·  view source on GitHub ↗
(
        &mut self,
        p: &ast::Pattern,
        pc: &mut PatternContext,
    )

Source from the content-addressed store, hash-verified

6136 }
6137
6138 fn compile_pattern_subpattern(
6139 &mut self,
6140 p: &ast::Pattern,
6141 pc: &mut PatternContext,
6142 ) -> CompileResult<()> {
6143 // Save the current allow_irrefutable state.
6144 let old_allow_irrefutable = pc.allow_irrefutable;
6145 // Temporarily allow irrefutable patterns.
6146 pc.allow_irrefutable = true;
6147 // Compile the pattern.
6148 self.compile_pattern(p, pc)?;
6149 // Restore the original state.
6150 pc.allow_irrefutable = old_allow_irrefutable;
6151 Ok(())
6152 }
6153
6154 fn compile_pattern_as(
6155 &mut self,

Calls 1

compile_patternMethod · 0.80

Tested by

no test coverage detected