aboutsummaryrefslogtreecommitdiff
path: root/src/grammar
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-07 22:59:16 +0100
committerAleksey Kladov <[email protected]>2018-08-07 22:59:16 +0100
commit678882d4f844135cc5df33de1f6da326ec96a78b (patch)
treea6a185b14fc8eb018f11a5e5b069a96934a48fb2 /src/grammar
parent64a65a4ff40e0c9b6d9453af79bba013afde2ffa (diff)
literal pattern
Diffstat (limited to 'src/grammar')
-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),