From d436ab05810c208b41a1b61896d3d87691cd9e99 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sun, 28 Apr 2019 23:46:03 +0800 Subject: Refactor parser handle mult-char punct internally --- crates/ra_syntax/tests/data/lexer/0004_numbers.txt | 3 ++- crates/ra_syntax/tests/data/lexer/0005_symbols.txt | 23 +++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'crates/ra_syntax/tests/data/lexer') diff --git a/crates/ra_syntax/tests/data/lexer/0004_numbers.txt b/crates/ra_syntax/tests/data/lexer/0004_numbers.txt index 4b5fd9f71..39988aedc 100644 --- a/crates/ra_syntax/tests/data/lexer/0004_numbers.txt +++ b/crates/ra_syntax/tests/data/lexer/0004_numbers.txt @@ -37,7 +37,8 @@ WHITESPACE 1 " " INT_NUMBER 6 "0E1279" WHITESPACE 1 "\n" INT_NUMBER 1 "0" -DOTDOT 2 ".." +DOT 1 "." +DOT 1 "." INT_NUMBER 1 "2" WHITESPACE 1 "\n" INT_NUMBER 1 "0" diff --git a/crates/ra_syntax/tests/data/lexer/0005_symbols.txt b/crates/ra_syntax/tests/data/lexer/0005_symbols.txt index a6bc83a6f..469a90e42 100644 --- a/crates/ra_syntax/tests/data/lexer/0005_symbols.txt +++ b/crates/ra_syntax/tests/data/lexer/0005_symbols.txt @@ -44,25 +44,34 @@ PERCENT 1 "%" WHITESPACE 1 "\n" DOT 1 "." WHITESPACE 1 " " -DOTDOT 2 ".." +DOT 1 "." +DOT 1 "." WHITESPACE 1 " " -DOTDOTDOT 3 "..." +DOT 1 "." +DOT 1 "." +DOT 1 "." WHITESPACE 1 " " -DOTDOTEQ 3 "..=" +DOT 1 "." +DOT 1 "." +EQ 1 "=" WHITESPACE 1 "\n" COLON 1 ":" WHITESPACE 1 " " -COLONCOLON 2 "::" +COLON 1 ":" +COLON 1 ":" WHITESPACE 1 "\n" EQ 1 "=" WHITESPACE 1 " " -FAT_ARROW 2 "=>" +EQ 1 "=" +R_ANGLE 1 ">" WHITESPACE 1 "\n" EXCL 1 "!" WHITESPACE 1 " " -NEQ 2 "!=" +EXCL 1 "!" +EQ 1 "=" WHITESPACE 1 "\n" MINUS 1 "-" WHITESPACE 1 " " -THIN_ARROW 2 "->" +MINUS 1 "-" +R_ANGLE 1 ">" WHITESPACE 1 "\n" -- cgit v1.2.3