diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err')
5 files changed, 102 insertions, 84 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt index 378b92834..7c1a23170 100644 --- a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt | |||
@@ -2,20 +2,22 @@ SOURCE_FILE@[0; 54) | |||
2 | FN_DEF@[0; 31) | 2 | FN_DEF@[0; 31) |
3 | ATTR@[0; 18) | 3 | ATTR@[0; 18) |
4 | POUND@[0; 1) "#" | 4 | POUND@[0; 1) "#" |
5 | TOKEN_TREE@[1; 18) | 5 | L_BRACK@[1; 2) "[" |
6 | L_BRACK@[1; 2) "[" | 6 | PATH@[2; 5) |
7 | IDENT@[2; 5) "foo" | 7 | PATH_SEGMENT@[2; 5) |
8 | TOKEN_TREE@[5; 17) | 8 | NAME_REF@[2; 5) |
9 | L_PAREN@[5; 6) "(" | 9 | IDENT@[2; 5) "foo" |
10 | IDENT@[6; 9) "foo" | 10 | TOKEN_TREE@[5; 17) |
11 | COMMA@[9; 10) "," | 11 | L_PAREN@[5; 6) "(" |
12 | WHITESPACE@[10; 11) " " | 12 | IDENT@[6; 9) "foo" |
13 | PLUS@[11; 12) "+" | 13 | COMMA@[9; 10) "," |
14 | COMMA@[12; 13) "," | 14 | WHITESPACE@[10; 11) " " |
15 | WHITESPACE@[13; 14) " " | 15 | PLUS@[11; 12) "+" |
16 | INT_NUMBER@[14; 16) "92" | 16 | COMMA@[12; 13) "," |
17 | R_PAREN@[16; 17) ")" | 17 | WHITESPACE@[13; 14) " " |
18 | R_BRACK@[17; 18) "]" | 18 | INT_NUMBER@[14; 16) "92" |
19 | R_PAREN@[16; 17) ")" | ||
20 | R_BRACK@[17; 18) "]" | ||
19 | WHITESPACE@[18; 19) "\n" | 21 | WHITESPACE@[18; 19) "\n" |
20 | FN_KW@[19; 21) "fn" | 22 | FN_KW@[19; 21) "fn" |
21 | WHITESPACE@[21; 22) " " | 23 | WHITESPACE@[21; 22) " " |
@@ -33,24 +35,26 @@ SOURCE_FILE@[0; 54) | |||
33 | WHITESPACE@[31; 34) "\n\n\n" | 35 | WHITESPACE@[31; 34) "\n\n\n" |
34 | ATTR@[34; 53) | 36 | ATTR@[34; 53) |
35 | POUND@[34; 35) "#" | 37 | POUND@[34; 35) "#" |
36 | TOKEN_TREE@[35; 53) | 38 | L_BRACK@[35; 36) "[" |
37 | L_BRACK@[35; 36) "[" | 39 | PATH@[36; 39) |
38 | IDENT@[36; 39) "foo" | 40 | PATH_SEGMENT@[36; 39) |
39 | TOKEN_TREE@[39; 53) | 41 | NAME_REF@[36; 39) |
40 | L_PAREN@[39; 40) "(" | 42 | IDENT@[36; 39) "foo" |
41 | WHITESPACE@[40; 41) "\n" | 43 | TOKEN_TREE@[39; 53) |
42 | FN_KW@[41; 43) "fn" | 44 | L_PAREN@[39; 40) "(" |
43 | WHITESPACE@[43; 44) " " | 45 | WHITESPACE@[40; 41) "\n" |
44 | IDENT@[44; 47) "foo" | 46 | FN_KW@[41; 43) "fn" |
45 | TOKEN_TREE@[47; 49) | 47 | WHITESPACE@[43; 44) " " |
46 | L_PAREN@[47; 48) "(" | 48 | IDENT@[44; 47) "foo" |
47 | R_PAREN@[48; 49) ")" | 49 | TOKEN_TREE@[47; 49) |
48 | WHITESPACE@[49; 50) " " | 50 | L_PAREN@[47; 48) "(" |
49 | TOKEN_TREE@[50; 53) | 51 | R_PAREN@[48; 49) ")" |
50 | L_CURLY@[50; 51) "{" | 52 | WHITESPACE@[49; 50) " " |
51 | WHITESPACE@[51; 52) "\n" | 53 | TOKEN_TREE@[50; 53) |
52 | R_CURLY@[52; 53) "}" | 54 | L_CURLY@[50; 51) "{" |
55 | WHITESPACE@[51; 52) "\n" | ||
56 | R_CURLY@[52; 53) "}" | ||
53 | WHITESPACE@[53; 54) "\n" | 57 | WHITESPACE@[53; 54) "\n" |
54 | error 53: expected R_PAREN | 58 | error 53: expected R_PAREN |
55 | error 53: expected R_BRACK | 59 | error 53: expected `]` |
56 | error 53: expected an item | 60 | error 53: expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt b/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt index 73d322c48..c5be73a5a 100644 --- a/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt +++ b/crates/ra_syntax/test_data/parser/err/0028_macro_2.0.txt | |||
@@ -60,10 +60,12 @@ SOURCE_FILE@[0; 349) | |||
60 | FN_DEF@[95; 348) | 60 | FN_DEF@[95; 348) |
61 | ATTR@[95; 102) | 61 | ATTR@[95; 102) |
62 | POUND@[95; 96) "#" | 62 | POUND@[95; 96) "#" |
63 | TOKEN_TREE@[96; 102) | 63 | L_BRACK@[96; 97) "[" |
64 | L_BRACK@[96; 97) "[" | 64 | PATH@[97; 101) |
65 | IDENT@[97; 101) "test" | 65 | PATH_SEGMENT@[97; 101) |
66 | R_BRACK@[101; 102) "]" | 66 | NAME_REF@[97; 101) |
67 | IDENT@[97; 101) "test" | ||
68 | R_BRACK@[101; 102) "]" | ||
67 | WHITESPACE@[102; 103) "\n" | 69 | WHITESPACE@[102; 103) "\n" |
68 | FN_KW@[103; 105) "fn" | 70 | FN_KW@[103; 105) "fn" |
69 | WHITESPACE@[105; 106) " " | 71 | WHITESPACE@[105; 106) " " |
diff --git a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt index f67325b76..522a0d0e0 100644 --- a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt | |||
@@ -28,14 +28,16 @@ SOURCE_FILE@[0; 350) | |||
28 | ATTR@[39; 83) | 28 | ATTR@[39; 83) |
29 | POUND@[39; 40) "#" | 29 | POUND@[39; 40) "#" |
30 | EXCL@[40; 41) "!" | 30 | EXCL@[40; 41) "!" |
31 | TOKEN_TREE@[41; 83) | 31 | L_BRACK@[41; 42) "[" |
32 | L_BRACK@[41; 42) "[" | 32 | PATH@[42; 45) |
33 | IDENT@[42; 45) "doc" | 33 | PATH_SEGMENT@[42; 45) |
34 | TOKEN_TREE@[45; 82) | 34 | NAME_REF@[42; 45) |
35 | L_PAREN@[45; 46) "(" | 35 | IDENT@[42; 45) "doc" |
36 | STRING@[46; 81) "\"Inner attributes not ..." | 36 | TOKEN_TREE@[45; 82) |
37 | R_PAREN@[81; 82) ")" | 37 | L_PAREN@[45; 46) "(" |
38 | R_BRACK@[82; 83) "]" | 38 | STRING@[46; 81) "\"Inner attributes not ..." |
39 | R_PAREN@[81; 82) ")" | ||
40 | R_BRACK@[82; 83) "]" | ||
39 | WHITESPACE@[83; 92) "\n " | 41 | WHITESPACE@[83; 92) "\n " |
40 | COMMENT@[92; 122) "//! Nor are ModuleDoc ..." | 42 | COMMENT@[92; 122) "//! Nor are ModuleDoc ..." |
41 | WHITESPACE@[122; 127) "\n " | 43 | WHITESPACE@[122; 127) "\n " |
@@ -57,26 +59,30 @@ SOURCE_FILE@[0; 350) | |||
57 | ATTR@[152; 171) | 59 | ATTR@[152; 171) |
58 | POUND@[152; 153) "#" | 60 | POUND@[152; 153) "#" |
59 | EXCL@[153; 154) "!" | 61 | EXCL@[153; 154) "!" |
60 | TOKEN_TREE@[154; 171) | 62 | L_BRACK@[154; 155) "[" |
61 | L_BRACK@[154; 155) "[" | 63 | PATH@[155; 158) |
62 | IDENT@[155; 158) "doc" | 64 | PATH_SEGMENT@[155; 158) |
63 | TOKEN_TREE@[158; 170) | 65 | NAME_REF@[155; 158) |
64 | L_PAREN@[158; 159) "(" | 66 | IDENT@[155; 158) "doc" |
65 | STRING@[159; 169) "\"Nor here\"" | 67 | TOKEN_TREE@[158; 170) |
66 | R_PAREN@[169; 170) ")" | 68 | L_PAREN@[158; 159) "(" |
67 | R_BRACK@[170; 171) "]" | 69 | STRING@[159; 169) "\"Nor here\"" |
70 | R_PAREN@[169; 170) ")" | ||
71 | R_BRACK@[170; 171) "]" | ||
68 | WHITESPACE@[171; 180) "\n " | 72 | WHITESPACE@[171; 180) "\n " |
69 | ATTR@[180; 212) | 73 | ATTR@[180; 212) |
70 | POUND@[180; 181) "#" | 74 | POUND@[180; 181) "#" |
71 | EXCL@[181; 182) "!" | 75 | EXCL@[181; 182) "!" |
72 | TOKEN_TREE@[182; 212) | 76 | L_BRACK@[182; 183) "[" |
73 | L_BRACK@[182; 183) "[" | 77 | PATH@[183; 186) |
74 | IDENT@[183; 186) "doc" | 78 | PATH_SEGMENT@[183; 186) |
75 | TOKEN_TREE@[186; 211) | 79 | NAME_REF@[183; 186) |
76 | L_PAREN@[186; 187) "(" | 80 | IDENT@[183; 186) "doc" |
77 | STRING@[187; 210) "\"We error on each attr\"" | 81 | TOKEN_TREE@[186; 211) |
78 | R_PAREN@[210; 211) ")" | 82 | L_PAREN@[186; 187) "(" |
79 | R_BRACK@[211; 212) "]" | 83 | STRING@[187; 210) "\"We error on each attr\"" |
84 | R_PAREN@[210; 211) ")" | ||
85 | R_BRACK@[211; 212) "]" | ||
80 | WHITESPACE@[212; 221) "\n " | 86 | WHITESPACE@[212; 221) "\n " |
81 | COMMENT@[221; 251) "//! Nor are ModuleDoc ..." | 87 | COMMENT@[221; 251) "//! Nor are ModuleDoc ..." |
82 | WHITESPACE@[251; 256) "\n " | 88 | WHITESPACE@[251; 256) "\n " |
@@ -96,14 +102,16 @@ SOURCE_FILE@[0; 350) | |||
96 | ATTR@[283; 302) | 102 | ATTR@[283; 302) |
97 | POUND@[283; 284) "#" | 103 | POUND@[283; 284) "#" |
98 | EXCL@[284; 285) "!" | 104 | EXCL@[284; 285) "!" |
99 | TOKEN_TREE@[285; 302) | 105 | L_BRACK@[285; 286) "[" |
100 | L_BRACK@[285; 286) "[" | 106 | PATH@[286; 289) |
101 | IDENT@[286; 289) "doc" | 107 | PATH_SEGMENT@[286; 289) |
102 | TOKEN_TREE@[289; 301) | 108 | NAME_REF@[286; 289) |
103 | L_PAREN@[289; 290) "(" | 109 | IDENT@[286; 289) "doc" |
104 | STRING@[290; 300) "\"Nor here\"" | 110 | TOKEN_TREE@[289; 301) |
105 | R_PAREN@[300; 301) ")" | 111 | L_PAREN@[289; 290) "(" |
106 | R_BRACK@[301; 302) "]" | 112 | STRING@[290; 300) "\"Nor here\"" |
113 | R_PAREN@[300; 301) ")" | ||
114 | R_BRACK@[301; 302) "]" | ||
107 | WHITESPACE@[302; 311) "\n " | 115 | WHITESPACE@[302; 311) "\n " |
108 | COMMENT@[311; 341) "//! Nor are ModuleDoc ..." | 116 | COMMENT@[311; 341) "//! Nor are ModuleDoc ..." |
109 | WHITESPACE@[341; 346) "\n " | 117 | WHITESPACE@[341; 346) "\n " |
diff --git a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt index 1344fcbc2..dbc0081ac 100644 --- a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt | |||
@@ -135,14 +135,16 @@ SOURCE_FILE@[0; 293) | |||
135 | MATCH_ARM@[210; 250) | 135 | MATCH_ARM@[210; 250) |
136 | ATTR@[210; 222) | 136 | ATTR@[210; 222) |
137 | POUND@[210; 211) "#" | 137 | POUND@[210; 211) "#" |
138 | TOKEN_TREE@[211; 222) | 138 | L_BRACK@[211; 212) "[" |
139 | L_BRACK@[211; 212) "[" | 139 | PATH@[212; 215) |
140 | IDENT@[212; 215) "cfg" | 140 | PATH_SEGMENT@[212; 215) |
141 | TOKEN_TREE@[215; 221) | 141 | NAME_REF@[212; 215) |
142 | L_PAREN@[215; 216) "(" | 142 | IDENT@[212; 215) "cfg" |
143 | IDENT@[216; 220) "test" | 143 | TOKEN_TREE@[215; 221) |
144 | R_PAREN@[220; 221) ")" | 144 | L_PAREN@[215; 216) "(" |
145 | R_BRACK@[221; 222) "]" | 145 | IDENT@[216; 220) "test" |
146 | R_PAREN@[220; 221) ")" | ||
147 | R_BRACK@[221; 222) "]" | ||
146 | WHITESPACE@[222; 231) "\n " | 148 | WHITESPACE@[222; 231) "\n " |
147 | ATTR@[231; 232) | 149 | ATTR@[231; 232) |
148 | POUND@[231; 232) "#" | 150 | POUND@[231; 232) "#" |
diff --git a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt index b65cc3de3..fd5ccc3f2 100644 --- a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt | |||
@@ -47,14 +47,16 @@ SOURCE_FILE@[0; 89) | |||
47 | MATCH_ARM@[68; 80) | 47 | MATCH_ARM@[68; 80) |
48 | ATTR@[68; 80) | 48 | ATTR@[68; 80) |
49 | POUND@[68; 69) "#" | 49 | POUND@[68; 69) "#" |
50 | TOKEN_TREE@[69; 80) | 50 | L_BRACK@[69; 70) "[" |
51 | L_BRACK@[69; 70) "[" | 51 | PATH@[70; 73) |
52 | IDENT@[70; 73) "cfg" | 52 | PATH_SEGMENT@[70; 73) |
53 | TOKEN_TREE@[73; 79) | 53 | NAME_REF@[70; 73) |
54 | L_PAREN@[73; 74) "(" | 54 | IDENT@[70; 73) "cfg" |
55 | IDENT@[74; 78) "test" | 55 | TOKEN_TREE@[73; 79) |
56 | R_PAREN@[78; 79) ")" | 56 | L_PAREN@[73; 74) "(" |
57 | R_BRACK@[79; 80) "]" | 57 | IDENT@[74; 78) "test" |
58 | R_PAREN@[78; 79) ")" | ||
59 | R_BRACK@[79; 80) "]" | ||
58 | WHITESPACE@[80; 85) "\n " | 60 | WHITESPACE@[80; 85) "\n " |
59 | R_CURLY@[85; 86) "}" | 61 | R_CURLY@[85; 86) "}" |
60 | WHITESPACE@[86; 87) "\n" | 62 | WHITESPACE@[86; 87) "\n" |