diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-27 12:12:14 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-27 12:12:14 +0000 |
commit | 55ab0c602e391537f5e1a84a617fdd817e6a4200 (patch) | |
tree | 3adb0077bd7d7a34376d87cbb0ae7ea5b942d532 /crates/ra_syntax/tests/data/parser | |
parent | dbf03b674e7e1a49d9b32ec5ed656df2aedd3ed3 (diff) | |
parent | 49b0fe20ab6aa752df3764908b7c21f4b1827e52 (diff) |
Merge #339
339: Fix assertion error for literals with suffixes r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests/data/parser')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt | 73 |
2 files changed, 79 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs new file mode 100644 index 000000000..261aad1fb --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn main() { | ||
2 | let _ = 'c'u32; | ||
3 | let _ = "string"invalid; | ||
4 | let _ = b'b'_suff; | ||
5 | let _ = b"bs"invalid; | ||
6 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt new file mode 100644 index 000000000..dc10e9ee7 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt | |||
@@ -0,0 +1,73 @@ | |||
1 | SOURCE_FILE@[0; 112) | ||
2 | FN_DEF@[0; 111) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 7) | ||
6 | IDENT@[3; 7) "main" | ||
7 | PARAM_LIST@[7; 9) | ||
8 | L_PAREN@[7; 8) | ||
9 | R_PAREN@[8; 9) | ||
10 | WHITESPACE@[9; 10) | ||
11 | BLOCK@[10; 111) | ||
12 | L_CURLY@[10; 11) | ||
13 | WHITESPACE@[11; 16) | ||
14 | LET_STMT@[16; 27) | ||
15 | LET_KW@[16; 19) | ||
16 | WHITESPACE@[19; 20) | ||
17 | PLACEHOLDER_PAT@[20; 21) | ||
18 | UNDERSCORE@[20; 21) | ||
19 | WHITESPACE@[21; 22) | ||
20 | EQ@[22; 23) | ||
21 | WHITESPACE@[23; 24) | ||
22 | LITERAL@[24; 27) | ||
23 | CHAR@[24; 27) | ||
24 | err: `expected SEMI` | ||
25 | EXPR_STMT@[27; 31) | ||
26 | PATH_EXPR@[27; 30) | ||
27 | PATH@[27; 30) | ||
28 | PATH_SEGMENT@[27; 30) | ||
29 | NAME_REF@[27; 30) | ||
30 | IDENT@[27; 30) "u32" | ||
31 | SEMI@[30; 31) | ||
32 | WHITESPACE@[31; 36) | ||
33 | LET_STMT@[36; 60) | ||
34 | LET_KW@[36; 39) | ||
35 | WHITESPACE@[39; 40) | ||
36 | PLACEHOLDER_PAT@[40; 41) | ||
37 | UNDERSCORE@[40; 41) | ||
38 | WHITESPACE@[41; 42) | ||
39 | EQ@[42; 43) | ||
40 | WHITESPACE@[43; 44) | ||
41 | LITERAL@[44; 59) | ||
42 | STRING@[44; 59) | ||
43 | err: `Invalid literal suffix` | ||
44 | SEMI@[59; 60) | ||
45 | WHITESPACE@[60; 65) | ||
46 | LET_STMT@[65; 83) | ||
47 | LET_KW@[65; 68) | ||
48 | WHITESPACE@[68; 69) | ||
49 | PLACEHOLDER_PAT@[69; 70) | ||
50 | UNDERSCORE@[69; 70) | ||
51 | WHITESPACE@[70; 71) | ||
52 | EQ@[71; 72) | ||
53 | WHITESPACE@[72; 73) | ||
54 | LITERAL@[73; 82) | ||
55 | BYTE@[73; 82) | ||
56 | err: `Invalid literal suffix` | ||
57 | SEMI@[82; 83) | ||
58 | WHITESPACE@[83; 88) | ||
59 | LET_STMT@[88; 109) | ||
60 | LET_KW@[88; 91) | ||
61 | WHITESPACE@[91; 92) | ||
62 | PLACEHOLDER_PAT@[92; 93) | ||
63 | UNDERSCORE@[92; 93) | ||
64 | WHITESPACE@[93; 94) | ||
65 | EQ@[94; 95) | ||
66 | WHITESPACE@[95; 96) | ||
67 | LITERAL@[96; 108) | ||
68 | BYTE_STRING@[96; 108) | ||
69 | err: `Invalid literal suffix` | ||
70 | SEMI@[108; 109) | ||
71 | WHITESPACE@[109; 110) | ||
72 | R_CURLY@[110; 111) | ||
73 | WHITESPACE@[111; 112) | ||