aboutsummaryrefslogtreecommitdiff
path: root/src/grammar/patterns.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grammar/patterns.rs')
-rw-r--r--src/grammar/patterns.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/grammar/patterns.rs b/src/grammar/patterns.rs
index 36ead7561..f23addfa3 100644
--- a/src/grammar/patterns.rs
+++ b/src/grammar/patterns.rs
@@ -13,6 +13,18 @@ pub(super) fn pattern(p: &mut Parser) {
13 return; 13 return;
14 } 14 }
15 15
16 // test literal_pattern
17 // fn main() {
18 // match () {
19 // 92 => (),
20 // 'c' => (),
21 // "hello" => (),
22 // }
23 // }
24 if expressions::literal(p).is_some() {
25 return;
26 }
27
16 match la0 { 28 match la0 {
17 UNDERSCORE => placeholder_pat(p), 29 UNDERSCORE => placeholder_pat(p),
18 AMP => ref_pat(p), 30 AMP => ref_pat(p),