diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err/0025_nope.rast')
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0025_nope.rast | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0025_nope.rast b/crates/ra_syntax/test_data/parser/err/0025_nope.rast new file mode 100644 index 000000000..ca7f2d255 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0025_nope.rast | |||
@@ -0,0 +1,204 @@ | |||
1 | SOURCE_FILE@[0; 575) | ||
2 | FN_DEF@[0; 574) | ||
3 | FN_KW@[0; 2) "fn" | ||
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_EXPR@[10; 574) | ||
12 | BLOCK@[10; 574) | ||
13 | L_CURLY@[10; 11) "{" | ||
14 | WHITESPACE@[11; 16) "\n " | ||
15 | ENUM_DEF@[16; 152) | ||
16 | ENUM_KW@[16; 20) "enum" | ||
17 | WHITESPACE@[20; 21) " " | ||
18 | NAME@[21; 25) | ||
19 | IDENT@[21; 25) "Test" | ||
20 | WHITESPACE@[25; 26) " " | ||
21 | ENUM_VARIANT_LIST@[26; 152) | ||
22 | L_CURLY@[26; 27) "{" | ||
23 | WHITESPACE@[27; 36) "\n " | ||
24 | ENUM_VARIANT@[36; 40) | ||
25 | NAME@[36; 40) | ||
26 | IDENT@[36; 40) "Var1" | ||
27 | COMMA@[40; 41) "," | ||
28 | WHITESPACE@[41; 50) "\n " | ||
29 | ENUM_VARIANT@[50; 62) | ||
30 | NAME@[50; 54) | ||
31 | IDENT@[50; 54) "Var2" | ||
32 | TUPLE_FIELD_DEF_LIST@[54; 62) | ||
33 | L_PAREN@[54; 55) "(" | ||
34 | TUPLE_FIELD_DEF@[55; 61) | ||
35 | PATH_TYPE@[55; 61) | ||
36 | PATH@[55; 61) | ||
37 | PATH_SEGMENT@[55; 61) | ||
38 | NAME_REF@[55; 61) | ||
39 | IDENT@[55; 61) "String" | ||
40 | R_PAREN@[61; 62) ")" | ||
41 | COMMA@[62; 63) "," | ||
42 | WHITESPACE@[63; 72) "\n " | ||
43 | ENUM_VARIANT@[72; 145) | ||
44 | NAME@[72; 76) | ||
45 | IDENT@[72; 76) "Var3" | ||
46 | WHITESPACE@[76; 77) " " | ||
47 | RECORD_FIELD_DEF_LIST@[77; 145) | ||
48 | L_CURLY@[77; 78) "{" | ||
49 | WHITESPACE@[78; 91) "\n " | ||
50 | RECORD_FIELD_DEF@[91; 95) | ||
51 | NAME@[91; 94) | ||
52 | IDENT@[91; 94) "abc" | ||
53 | COLON@[94; 95) ":" | ||
54 | WHITESPACE@[95; 96) " " | ||
55 | ERROR@[96; 98) | ||
56 | L_CURLY@[96; 97) "{" | ||
57 | R_CURLY@[97; 98) "}" | ||
58 | ERROR@[98; 99) | ||
59 | COMMA@[98; 99) "," | ||
60 | WHITESPACE@[99; 100) " " | ||
61 | COMMENT@[100; 135) "//~ ERROR: expected t ..." | ||
62 | WHITESPACE@[135; 144) "\n " | ||
63 | R_CURLY@[144; 145) "}" | ||
64 | COMMA@[145; 146) "," | ||
65 | WHITESPACE@[146; 151) "\n " | ||
66 | R_CURLY@[151; 152) "}" | ||
67 | WHITESPACE@[152; 158) "\n\n " | ||
68 | COMMENT@[158; 171) "// recover..." | ||
69 | WHITESPACE@[171; 176) "\n " | ||
70 | LET_STMT@[176; 186) | ||
71 | LET_KW@[176; 179) "let" | ||
72 | WHITESPACE@[179; 180) " " | ||
73 | BIND_PAT@[180; 181) | ||
74 | NAME@[180; 181) | ||
75 | IDENT@[180; 181) "a" | ||
76 | WHITESPACE@[181; 182) " " | ||
77 | EQ@[182; 183) "=" | ||
78 | WHITESPACE@[183; 184) " " | ||
79 | LITERAL@[184; 185) | ||
80 | INT_NUMBER@[184; 185) "1" | ||
81 | SEMI@[185; 186) ";" | ||
82 | WHITESPACE@[186; 191) "\n " | ||
83 | ENUM_DEF@[191; 223) | ||
84 | ENUM_KW@[191; 195) "enum" | ||
85 | WHITESPACE@[195; 196) " " | ||
86 | NAME@[196; 201) | ||
87 | IDENT@[196; 201) "Test2" | ||
88 | WHITESPACE@[201; 202) " " | ||
89 | ENUM_VARIANT_LIST@[202; 223) | ||
90 | L_CURLY@[202; 203) "{" | ||
91 | WHITESPACE@[203; 212) "\n " | ||
92 | ENUM_VARIANT@[212; 216) | ||
93 | NAME@[212; 216) | ||
94 | IDENT@[212; 216) "Fine" | ||
95 | COMMA@[216; 217) "," | ||
96 | WHITESPACE@[217; 222) "\n " | ||
97 | R_CURLY@[222; 223) "}" | ||
98 | WHITESPACE@[223; 229) "\n\n " | ||
99 | ENUM_DEF@[229; 300) | ||
100 | ENUM_KW@[229; 233) "enum" | ||
101 | WHITESPACE@[233; 234) " " | ||
102 | NAME@[234; 239) | ||
103 | IDENT@[234; 239) "Test3" | ||
104 | WHITESPACE@[239; 240) " " | ||
105 | ENUM_VARIANT_LIST@[240; 300) | ||
106 | L_CURLY@[240; 241) "{" | ||
107 | WHITESPACE@[241; 250) "\n " | ||
108 | ENUM_VARIANT@[250; 293) | ||
109 | NAME@[250; 259) | ||
110 | IDENT@[250; 259) "StillFine" | ||
111 | WHITESPACE@[259; 260) " " | ||
112 | RECORD_FIELD_DEF_LIST@[260; 293) | ||
113 | L_CURLY@[260; 261) "{" | ||
114 | WHITESPACE@[261; 274) "\n " | ||
115 | RECORD_FIELD_DEF@[274; 282) | ||
116 | NAME@[274; 277) | ||
117 | IDENT@[274; 277) "def" | ||
118 | COLON@[277; 278) ":" | ||
119 | WHITESPACE@[278; 279) " " | ||
120 | PATH_TYPE@[279; 282) | ||
121 | PATH@[279; 282) | ||
122 | PATH_SEGMENT@[279; 282) | ||
123 | NAME_REF@[279; 282) | ||
124 | IDENT@[279; 282) "i32" | ||
125 | COMMA@[282; 283) "," | ||
126 | WHITESPACE@[283; 292) "\n " | ||
127 | R_CURLY@[292; 293) "}" | ||
128 | COMMA@[293; 294) "," | ||
129 | WHITESPACE@[294; 299) "\n " | ||
130 | R_CURLY@[299; 300) "}" | ||
131 | WHITESPACE@[300; 306) "\n\n " | ||
132 | EXPR_STMT@[306; 459) | ||
133 | BLOCK_EXPR@[306; 459) | ||
134 | BLOCK@[306; 459) | ||
135 | L_CURLY@[306; 307) "{" | ||
136 | WHITESPACE@[307; 316) "\n " | ||
137 | ENUM_DEF@[316; 453) | ||
138 | COMMENT@[316; 329) "// fail again" | ||
139 | WHITESPACE@[329; 338) "\n " | ||
140 | ENUM_KW@[338; 342) "enum" | ||
141 | WHITESPACE@[342; 343) " " | ||
142 | NAME@[343; 348) | ||
143 | IDENT@[343; 348) "Test4" | ||
144 | WHITESPACE@[348; 349) " " | ||
145 | ENUM_VARIANT_LIST@[349; 453) | ||
146 | L_CURLY@[349; 350) "{" | ||
147 | WHITESPACE@[350; 363) "\n " | ||
148 | ENUM_VARIANT@[363; 372) | ||
149 | NAME@[363; 367) | ||
150 | IDENT@[363; 367) "Nope" | ||
151 | TUPLE_FIELD_DEF_LIST@[367; 372) | ||
152 | L_PAREN@[367; 368) "(" | ||
153 | TUPLE_FIELD_DEF@[368; 371) | ||
154 | PATH_TYPE@[368; 371) | ||
155 | PATH@[368; 371) | ||
156 | PATH_SEGMENT@[368; 371) | ||
157 | NAME_REF@[368; 371) | ||
158 | IDENT@[368; 371) "i32" | ||
159 | WHITESPACE@[371; 372) " " | ||
160 | ERROR@[372; 372) | ||
161 | ERROR@[372; 374) | ||
162 | L_CURLY@[372; 373) "{" | ||
163 | R_CURLY@[373; 374) "}" | ||
164 | ERROR@[374; 375) | ||
165 | R_PAREN@[374; 375) ")" | ||
166 | WHITESPACE@[375; 376) " " | ||
167 | COMMENT@[376; 396) "//~ ERROR: found `{`" | ||
168 | WHITESPACE@[396; 422) "\n ..." | ||
169 | COMMENT@[422; 443) "//~^ ERROR: found `{`" | ||
170 | WHITESPACE@[443; 452) "\n " | ||
171 | R_CURLY@[452; 453) "}" | ||
172 | WHITESPACE@[453; 458) "\n " | ||
173 | R_CURLY@[458; 459) "}" | ||
174 | WHITESPACE@[459; 464) "\n " | ||
175 | COMMENT@[464; 486) "// still recover later" | ||
176 | WHITESPACE@[486; 491) "\n " | ||
177 | LET_STMT@[491; 510) | ||
178 | LET_KW@[491; 494) "let" | ||
179 | WHITESPACE@[494; 495) " " | ||
180 | BIND_PAT@[495; 505) | ||
181 | NAME@[495; 505) | ||
182 | IDENT@[495; 505) "bad_syntax" | ||
183 | WHITESPACE@[505; 506) " " | ||
184 | EQ@[506; 507) "=" | ||
185 | WHITESPACE@[507; 508) " " | ||
186 | ERROR@[508; 509) | ||
187 | UNDERSCORE@[508; 509) "_" | ||
188 | SEMI@[509; 510) ";" | ||
189 | WHITESPACE@[510; 511) " " | ||
190 | COMMENT@[511; 572) "//~ ERROR: expected e ..." | ||
191 | WHITESPACE@[572; 573) "\n" | ||
192 | R_CURLY@[573; 574) "}" | ||
193 | WHITESPACE@[574; 575) "\n" | ||
194 | error [95; 95): expected type | ||
195 | error [95; 95): expected COMMA | ||
196 | error [96; 96): expected field | ||
197 | error [98; 98): expected field declaration | ||
198 | error [371; 371): expected COMMA | ||
199 | error [372; 372): expected a type | ||
200 | error [372; 372): expected R_PAREN | ||
201 | error [372; 372): expected COMMA | ||
202 | error [372; 372): expected enum variant | ||
203 | error [374; 374): expected enum variant | ||
204 | error [508; 508): expected expression | ||