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/tests/data/parser/ok/0035_weird_exprs.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crates/ra_syntax/tests/data/parser/ok') diff --git a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt b/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt index 20932a837..f3987c3b7 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt @@ -456,8 +456,9 @@ SOURCE_FILE@[0; 3813) L_CURLY@[930; 931) WHITESPACE@[931; 952) MATCH_ARM@[952; 1147) - LITERAL@[952; 953) - INT_NUMBER@[952; 953) "1" + LITERAL_PAT@[952; 953) + LITERAL@[952; 953) + INT_NUMBER@[952; 953) "1" WHITESPACE@[953; 954) FAT_ARROW@[954; 956) WHITESPACE@[956; 957) @@ -1080,8 +1081,9 @@ SOURCE_FILE@[0; 3813) L_CURLY@[1853; 1854) WHITESPACE@[1854; 1855) MATCH_ARM@[1855; 1863) - LITERAL@[1855; 1856) - INT_NUMBER@[1855; 1856) "1" + LITERAL_PAT@[1855; 1856) + LITERAL@[1855; 1856) + INT_NUMBER@[1855; 1856) "1" WHITESPACE@[1856; 1857) FAT_ARROW@[1857; 1859) WHITESPACE@[1859; 1860) -- cgit v1.2.3