From fad3e50987311a3c42a45bd3d9dbcf7c7a77e544 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 30 Dec 2017 16:30:37 +0300 Subject: Lexer: symbols --- tests/data/lexer/0004_number.txt | 11 +++++------ tests/data/lexer/0005_symbols.rs | 3 +++ tests/data/lexer/0005_symbols.txt | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 tests/data/lexer/0005_symbols.rs create mode 100644 tests/data/lexer/0005_symbols.txt (limited to 'tests/data/lexer') diff --git a/tests/data/lexer/0004_number.txt b/tests/data/lexer/0004_number.txt index 94fe0302d..ede39aa99 100644 --- a/tests/data/lexer/0004_number.txt +++ b/tests/data/lexer/0004_number.txt @@ -38,22 +38,21 @@ WHITESPACE 1 " " INT_NUMBER 6 "0E1279" WHITESPACE 1 "\n" INT_NUMBER 1 "0" -ERROR 1 "." -ERROR 1 "." +DOTDOT 2 ".." INT_NUMBER 1 "2" WHITESPACE 1 "\n" INT_NUMBER 1 "0" -ERROR 1 "." +DOT 1 "." IDENT 3 "foo" -ERROR 1 "(" -ERROR 1 ")" +L_PAREN 1 "(" +R_PAREN 1 ")" WHITESPACE 1 "\n" INT_NUMBER 2 "0e" ERROR 1 "+" INT_NUMBER 1 "1" WHITESPACE 1 "\n" INT_NUMBER 1 "0" -ERROR 1 "." +DOT 1 "." IDENT 1 "e" ERROR 1 "+" INT_NUMBER 1 "1" diff --git a/tests/data/lexer/0005_symbols.rs b/tests/data/lexer/0005_symbols.rs new file mode 100644 index 000000000..79747d5e1 --- /dev/null +++ b/tests/data/lexer/0005_symbols.rs @@ -0,0 +1,3 @@ +; , ( ) { } [ ] @ # ~ ? $ +. .. ... ..= +: :: \ No newline at end of file diff --git a/tests/data/lexer/0005_symbols.txt b/tests/data/lexer/0005_symbols.txt new file mode 100644 index 000000000..c845d2dff --- /dev/null +++ b/tests/data/lexer/0005_symbols.txt @@ -0,0 +1,37 @@ +SEMI 1 ";" +WHITESPACE 1 " " +COMMA 1 "," +WHITESPACE 1 " " +L_PAREN 1 "(" +WHITESPACE 1 " " +R_PAREN 1 ")" +WHITESPACE 1 " " +L_CURLY 1 "{" +WHITESPACE 1 " " +R_CURLY 1 "}" +WHITESPACE 1 " " +L_BRACK 1 "[" +WHITESPACE 1 " " +R_BRACK 1 "]" +WHITESPACE 1 " " +AT 1 "@" +WHITESPACE 1 " " +POUND 1 "#" +WHITESPACE 1 " " +TILDE 1 "~" +WHITESPACE 1 " " +QUESTION 1 "?" +WHITESPACE 1 " " +DOLLAR 1 "$" +WHITESPACE 1 "\n" +DOT 1 "." +WHITESPACE 1 " " +DOTDOT 2 ".." +WHITESPACE 1 " " +DOTDOTDOT 3 "..." +WHITESPACE 1 " " +DOTDOTEQ 3 "..=" +WHITESPACE 1 "\n" +COLON 1 ":" +WHITESPACE 1 " " +COLONCOLON 2 "::" -- cgit v1.2.3