(
&mut self,
p: &ast::PatternMatchValue,
pc: &mut PatternContext,
)
| 6727 | } |
| 6728 | |
| 6729 | fn compile_pattern_value( |
| 6730 | &mut self, |
| 6731 | p: &ast::PatternMatchValue, |
| 6732 | pc: &mut PatternContext, |
| 6733 | ) -> CompileResult<()> { |
| 6734 | // TODO: ensure literal or attribute lookup |
| 6735 | self.compile_expression(&p.value)?; |
| 6736 | emit!( |
| 6737 | self, |
| 6738 | Instruction::CompareOp { |
| 6739 | opname: bytecode::ComparisonOperator::Equal |
| 6740 | } |
| 6741 | ); |
| 6742 | // emit!(self, Instruction::ToBool); |
| 6743 | self.jump_to_fail_pop(pc, JumpOp::PopJumpIfFalse)?; |
| 6744 | Ok(()) |
| 6745 | } |
| 6746 | |
| 6747 | fn compile_pattern_singleton( |
| 6748 | &mut self, |
no test coverage detected