(vm: &VirtualMachine, name: &ast::Identifier)
| 150 | } |
| 151 | |
| 152 | fn validate_capture(vm: &VirtualMachine, name: &ast::Identifier) -> PyResult<()> { |
| 153 | if name.as_str() == "_" { |
| 154 | return Err(vm.new_value_error("can't capture name '_' in patterns")); |
| 155 | } |
| 156 | validate_name(vm, name.id()) |
| 157 | } |
| 158 | |
| 159 | fn validate_pattern(vm: &VirtualMachine, pattern: &ast::Pattern, star_ok: bool) -> PyResult<()> { |
| 160 | match pattern { |
no test coverage detected