From f1afc933530a87bd0cc7b25726c9a7fff3f3e007 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 9 Feb 2019 19:07:35 +0100 Subject: Fix handling of literal patterns Wrap them in a LiteralPat node so they can be distinguished from literal expressions. --- crates/ra_syntax/src/grammar.ron | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_syntax/src/grammar.ron') 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( "TUPLE_PAT", "SLICE_PAT", "RANGE_PAT", + "LITERAL_PAT", // atoms "TUPLE_EXPR", @@ -524,6 +525,7 @@ Grammar( "TuplePat": ( collections: [["args", "Pat"]] ), "SlicePat": (), "RangePat": (), + "LiteralPat": (options: ["Literal"]), "Pat": ( enum: [ @@ -536,6 +538,7 @@ Grammar( "TuplePat", "SlicePat", "RangePat", + "LiteralPat", ], ), -- cgit v1.2.3