aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar.ron
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-02-09 18:07:35 +0000
committerFlorian Diebold <[email protected]>2019-02-09 20:37:30 +0000
commitf1afc933530a87bd0cc7b25726c9a7fff3f3e007 (patch)
treecfa9a55a6d9df93129502be655d6c26dee1bc5c1 /crates/ra_syntax/src/grammar.ron
parent7ebde241c00cd9eb816b1aa7cb212a946afb0d3e (diff)
Fix handling of literal patterns
Wrap them in a LiteralPat node so they can be distinguished from literal expressions.
Diffstat (limited to 'crates/ra_syntax/src/grammar.ron')
-rw-r--r--crates/ra_syntax/src/grammar.ron3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 046db5885..d428bc595 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -161,6 +161,7 @@ Grammar(
161 "TUPLE_PAT", 161 "TUPLE_PAT",
162 "SLICE_PAT", 162 "SLICE_PAT",
163 "RANGE_PAT", 163 "RANGE_PAT",
164 "LITERAL_PAT",
164 165
165 // atoms 166 // atoms
166 "TUPLE_EXPR", 167 "TUPLE_EXPR",
@@ -524,6 +525,7 @@ Grammar(
524 "TuplePat": ( collections: [["args", "Pat"]] ), 525 "TuplePat": ( collections: [["args", "Pat"]] ),
525 "SlicePat": (), 526 "SlicePat": (),
526 "RangePat": (), 527 "RangePat": (),
528 "LiteralPat": (options: ["Literal"]),
527 529
528 "Pat": ( 530 "Pat": (
529 enum: [ 531 enum: [
@@ -536,6 +538,7 @@ Grammar(
536 "TuplePat", 538 "TuplePat",
537 "SlicePat", 539 "SlicePat",
538 "RangePat", 540 "RangePat",
541 "LiteralPat",
539 ], 542 ],
540 ), 543 ),
541 544