Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/patterns.rs')
| -rw-r--r-- | crates/parser/src/grammar/patterns.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/parser/src/grammar/patterns.rs b/crates/parser/src/grammar/patterns.rs index 9da94ce162..70ff87b238 100644 --- a/crates/parser/src/grammar/patterns.rs +++ b/crates/parser/src/grammar/patterns.rs @@ -74,6 +74,11 @@ fn pattern_single_r(p: &mut Parser, recovery_set: TokenSet) { // Some(0) | None => (), // Some(1..) => () // } + // + // match (10 as u8, 5 as u8) { + // (0, _) => (), + // (1.., _) => () + // } // } // FIXME: support half_open_range_patterns (`..=2`), @@ -85,7 +90,7 @@ fn pattern_single_r(p: &mut Parser, recovery_set: TokenSet) { // `0 .. =>` or `let 0 .. =` or `Some(0 .. )` // ^ ^ ^ - if p.at(T![=]) | p.at(T![')']) { + if p.at(T![=]) | p.at(T![')']) | p.at(T![,]) { // test half_open_range_pat // fn f() { let 0 .. = 1u32; } } else { |