diff options
author | Aleksey Kladov <[email protected]> | 2017-12-30 13:30:37 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2017-12-30 13:30:44 +0000 |
commit | fad3e50987311a3c42a45bd3d9dbcf7c7a77e544 (patch) | |
tree | b5f1d262e5ecb1226dc73780db50ee3eebe66ff8 /tests | |
parent | 3e91e8b77db443775eea2ccd40b0cf1e27dc77d8 (diff) |
Lexer: symbols
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/lexer/0004_number.txt | 11 | ||||
-rw-r--r-- | tests/data/lexer/0005_symbols.rs | 3 | ||||
-rw-r--r-- | tests/data/lexer/0005_symbols.txt | 37 |
3 files changed, 45 insertions, 6 deletions
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 " " | |||
38 | INT_NUMBER 6 "0E1279" | 38 | INT_NUMBER 6 "0E1279" |
39 | WHITESPACE 1 "\n" | 39 | WHITESPACE 1 "\n" |
40 | INT_NUMBER 1 "0" | 40 | INT_NUMBER 1 "0" |
41 | ERROR 1 "." | 41 | DOTDOT 2 ".." |
42 | ERROR 1 "." | ||
43 | INT_NUMBER 1 "2" | 42 | INT_NUMBER 1 "2" |
44 | WHITESPACE 1 "\n" | 43 | WHITESPACE 1 "\n" |
45 | INT_NUMBER 1 "0" | 44 | INT_NUMBER 1 "0" |
46 | ERROR 1 "." | 45 | DOT 1 "." |
47 | IDENT 3 "foo" | 46 | IDENT 3 "foo" |
48 | ERROR 1 "(" | 47 | L_PAREN 1 "(" |
49 | ERROR 1 ")" | 48 | R_PAREN 1 ")" |
50 | WHITESPACE 1 "\n" | 49 | WHITESPACE 1 "\n" |
51 | INT_NUMBER 2 "0e" | 50 | INT_NUMBER 2 "0e" |
52 | ERROR 1 "+" | 51 | ERROR 1 "+" |
53 | INT_NUMBER 1 "1" | 52 | INT_NUMBER 1 "1" |
54 | WHITESPACE 1 "\n" | 53 | WHITESPACE 1 "\n" |
55 | INT_NUMBER 1 "0" | 54 | INT_NUMBER 1 "0" |
56 | ERROR 1 "." | 55 | DOT 1 "." |
57 | IDENT 1 "e" | 56 | IDENT 1 "e" |
58 | ERROR 1 "+" | 57 | ERROR 1 "+" |
59 | INT_NUMBER 1 "1" | 58 | 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 @@ | |||
1 | ; , ( ) { } [ ] @ # ~ ? $ | ||
2 | . .. ... ..= | ||
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 @@ | |||
1 | SEMI 1 ";" | ||
2 | WHITESPACE 1 " " | ||
3 | COMMA 1 "," | ||
4 | WHITESPACE 1 " " | ||
5 | L_PAREN 1 "(" | ||
6 | WHITESPACE 1 " " | ||
7 | R_PAREN 1 ")" | ||
8 | WHITESPACE 1 " " | ||
9 | L_CURLY 1 "{" | ||
10 | WHITESPACE 1 " " | ||
11 | R_CURLY 1 "}" | ||
12 | WHITESPACE 1 " " | ||
13 | L_BRACK 1 "[" | ||
14 | WHITESPACE 1 " " | ||
15 | R_BRACK 1 "]" | ||
16 | WHITESPACE 1 " " | ||
17 | AT 1 "@" | ||
18 | WHITESPACE 1 " " | ||
19 | POUND 1 "#" | ||
20 | WHITESPACE 1 " " | ||
21 | TILDE 1 "~" | ||
22 | WHITESPACE 1 " " | ||
23 | QUESTION 1 "?" | ||
24 | WHITESPACE 1 " " | ||
25 | DOLLAR 1 "$" | ||
26 | WHITESPACE 1 "\n" | ||
27 | DOT 1 "." | ||
28 | WHITESPACE 1 " " | ||
29 | DOTDOT 2 ".." | ||
30 | WHITESPACE 1 " " | ||
31 | DOTDOTDOT 3 "..." | ||
32 | WHITESPACE 1 " " | ||
33 | DOTDOTEQ 3 "..=" | ||
34 | WHITESPACE 1 "\n" | ||
35 | COLON 1 ":" | ||
36 | WHITESPACE 1 " " | ||
37 | COLONCOLON 2 "::" | ||