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