From a071e09412d602d184a70b4b1fc0158fafd3e38e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 31 Dec 2017 15:29:09 +0300 Subject: Lexer: more symbols --- tests/data/lexer/0004_numbers.txt | 4 ++-- tests/data/lexer/0005_symbols.rs | 5 +++-- tests/data/lexer/0005_symbols.txt | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) (limited to 'tests/data/lexer') diff --git a/tests/data/lexer/0004_numbers.txt b/tests/data/lexer/0004_numbers.txt index be8dee48b..4b5fd9f71 100644 --- a/tests/data/lexer/0004_numbers.txt +++ b/tests/data/lexer/0004_numbers.txt @@ -47,13 +47,13 @@ L_PAREN 1 "(" R_PAREN 1 ")" WHITESPACE 1 "\n" INT_NUMBER 2 "0e" -ERROR 1 "+" +PLUS 1 "+" INT_NUMBER 1 "1" WHITESPACE 1 "\n" INT_NUMBER 1 "0" DOT 1 "." IDENT 1 "e" -ERROR 1 "+" +PLUS 1 "+" INT_NUMBER 1 "1" WHITESPACE 1 "\n" FLOAT_NUMBER 6 "0.0E-2" diff --git a/tests/data/lexer/0005_symbols.rs b/tests/data/lexer/0005_symbols.rs index c41e985a1..487569b5a 100644 --- a/tests/data/lexer/0005_symbols.rs +++ b/tests/data/lexer/0005_symbols.rs @@ -1,5 +1,6 @@ -; , ( ) { } [ ] < > @ # ~ ? $ +; , ( ) { } [ ] < > @ # ~ ? $ & | + * / ^ % . .. ... ..= : :: = => -! != \ No newline at end of file +! != +- -> diff --git a/tests/data/lexer/0005_symbols.txt b/tests/data/lexer/0005_symbols.txt index a1b777a92..ebb41accd 100644 --- a/tests/data/lexer/0005_symbols.txt +++ b/tests/data/lexer/0005_symbols.txt @@ -27,6 +27,20 @@ WHITESPACE 1 " " QUESTION 1 "?" WHITESPACE 1 " " DOLLAR 1 "$" +WHITESPACE 1 " " +AMPERSAND 1 "&" +WHITESPACE 1 " " +PIPE 1 "|" +WHITESPACE 1 " " +PLUS 1 "+" +WHITESPACE 1 " " +STAR 1 "*" +WHITESPACE 1 " " +SLASH 1 "/" +WHITESPACE 1 " " +CARET 1 "^" +WHITESPACE 1 " " +PERCENT 1 "%" WHITESPACE 1 "\n" DOT 1 "." WHITESPACE 1 " " @@ -47,3 +61,8 @@ WHITESPACE 1 "\n" NOT 1 "!" WHITESPACE 1 " " NEQ 2 "!=" +WHITESPACE 1 "\n" +MINUS 1 "-" +WHITESPACE 1 " " +THIN_ARROW 2 "->" +WHITESPACE 1 "\n" -- cgit v1.2.3