diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/libsyntax2/src/grammar/items/mod.rs | 1 | ||||
-rw-r--r-- | crates/libsyntax2/src/lib.rs | 3 | ||||
-rw-r--r-- | crates/libsyntax2/tests/data/parser/ok/0031_extern.rs | 29 | ||||
-rw-r--r-- | crates/libsyntax2/tests/data/parser/ok/0031_extern.txt | 973 | ||||
-rw-r--r-- | crates/libsyntax2/tests/test/main.rs | 1 | ||||
-rw-r--r-- | crates/server/src/main_loop/mod.rs | 2 | ||||
-rw-r--r-- | crates/server/tests/heavy_tests/main.rs | 18 | ||||
-rw-r--r-- | crates/server/tests/heavy_tests/support.rs | 13 |
8 files changed, 1032 insertions, 8 deletions
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index e672aa419..5466146b4 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs | |||
@@ -227,6 +227,7 @@ fn extern_item_list(p: &mut Parser) { | |||
227 | assert!(p.at(L_CURLY)); | 227 | assert!(p.at(L_CURLY)); |
228 | let m = p.start(); | 228 | let m = p.start(); |
229 | p.bump(); | 229 | p.bump(); |
230 | mod_contents(p, true); | ||
230 | p.expect(R_CURLY); | 231 | p.expect(R_CURLY); |
231 | m.complete(p, EXTERN_ITEM_LIST); | 232 | m.complete(p, EXTERN_ITEM_LIST); |
232 | } | 233 | } |
diff --git a/crates/libsyntax2/src/lib.rs b/crates/libsyntax2/src/lib.rs index ccf13e4ab..3b5115110 100644 --- a/crates/libsyntax2/src/lib.rs +++ b/crates/libsyntax2/src/lib.rs | |||
@@ -127,7 +127,8 @@ fn validate_block_structure(root: SyntaxNodeRef) { | |||
127 | assert_eq!( | 127 | assert_eq!( |
128 | node.parent(), | 128 | node.parent(), |
129 | pair.parent(), | 129 | pair.parent(), |
130 | "\nunpaired curleys:\n{}", | 130 | "\nunpaired curleys:\n{}\n{}\n", |
131 | root.text(), | ||
131 | utils::dump_tree(root), | 132 | utils::dump_tree(root), |
132 | ); | 133 | ); |
133 | assert!( | 134 | assert!( |
diff --git a/crates/libsyntax2/tests/data/parser/ok/0031_extern.rs b/crates/libsyntax2/tests/data/parser/ok/0031_extern.rs new file mode 100644 index 000000000..b33ac273c --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/ok/0031_extern.rs | |||
@@ -0,0 +1,29 @@ | |||
1 | extern { | ||
2 | pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int; | ||
3 | pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int; | ||
4 | pub fn connect(socket: ::c_int, address: *const sockaddr, | ||
5 | len: socklen_t) -> ::c_int; | ||
6 | pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; | ||
7 | pub fn getsockname(socket: ::c_int, address: *mut sockaddr, | ||
8 | address_len: *mut socklen_t) -> ::c_int; | ||
9 | pub fn getsockopt(sockfd: ::c_int, | ||
10 | level: ::c_int, | ||
11 | optname: ::c_int, | ||
12 | optval: *mut ::c_void, | ||
13 | optlen: *mut ::socklen_t) -> ::c_int; | ||
14 | pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int, | ||
15 | value: *const ::c_void, | ||
16 | option_len: socklen_t) -> ::c_int; | ||
17 | pub fn getpeername(socket: ::c_int, address: *mut sockaddr, | ||
18 | address_len: *mut socklen_t) -> ::c_int; | ||
19 | pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t, | ||
20 | flags: ::c_int, addr: *const sockaddr, | ||
21 | addrlen: socklen_t) -> ::ssize_t; | ||
22 | pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, | ||
23 | flags: ::c_int) -> ::ssize_t; | ||
24 | pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, | ||
25 | flags: ::c_int, addr: *mut ::sockaddr, | ||
26 | addrlen: *mut ::socklen_t) -> ::ssize_t; | ||
27 | pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, | ||
28 | flags: ::c_int) -> ::ssize_t; | ||
29 | } | ||
diff --git a/crates/libsyntax2/tests/data/parser/ok/0031_extern.txt b/crates/libsyntax2/tests/data/parser/ok/0031_extern.txt new file mode 100644 index 000000000..f3f1c25a9 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/ok/0031_extern.txt | |||
@@ -0,0 +1,973 @@ | |||
1 | ROOT@[0; 1598) | ||
2 | EXTERN_BLOCK@[0; 1597) | ||
3 | ABI@[0; 6) | ||
4 | EXTERN_KW@[0; 6) | ||
5 | WHITESPACE@[6; 7) | ||
6 | EXTERN_ITEM_LIST@[7; 1597) | ||
7 | L_CURLY@[7; 8) | ||
8 | WHITESPACE@[8; 13) | ||
9 | FN_DEF@[13; 87) | ||
10 | VISIBILITY@[13; 16) | ||
11 | PUB_KW@[13; 16) | ||
12 | WHITESPACE@[16; 17) | ||
13 | FN_KW@[17; 19) | ||
14 | WHITESPACE@[19; 20) | ||
15 | NAME@[20; 26) | ||
16 | IDENT@[20; 26) "socket" | ||
17 | PARAM_LIST@[26; 75) | ||
18 | L_PAREN@[26; 27) | ||
19 | PARAM@[27; 42) | ||
20 | BIND_PAT@[27; 33) | ||
21 | NAME@[27; 33) | ||
22 | IDENT@[27; 33) "domain" | ||
23 | COLON@[33; 34) | ||
24 | WHITESPACE@[34; 35) | ||
25 | PATH_TYPE@[35; 42) | ||
26 | PATH@[35; 42) | ||
27 | PATH_SEGMENT@[35; 42) | ||
28 | COLONCOLON@[35; 37) | ||
29 | NAME_REF@[37; 42) | ||
30 | IDENT@[37; 42) "c_int" | ||
31 | COMMA@[42; 43) | ||
32 | WHITESPACE@[43; 44) | ||
33 | PARAM@[44; 55) | ||
34 | BIND_PAT@[44; 46) | ||
35 | NAME@[44; 46) | ||
36 | IDENT@[44; 46) "ty" | ||
37 | COLON@[46; 47) | ||
38 | WHITESPACE@[47; 48) | ||
39 | PATH_TYPE@[48; 55) | ||
40 | PATH@[48; 55) | ||
41 | PATH_SEGMENT@[48; 55) | ||
42 | COLONCOLON@[48; 50) | ||
43 | NAME_REF@[50; 55) | ||
44 | IDENT@[50; 55) "c_int" | ||
45 | COMMA@[55; 56) | ||
46 | WHITESPACE@[56; 57) | ||
47 | PARAM@[57; 74) | ||
48 | BIND_PAT@[57; 65) | ||
49 | NAME@[57; 65) | ||
50 | IDENT@[57; 65) "protocol" | ||
51 | COLON@[65; 66) | ||
52 | WHITESPACE@[66; 67) | ||
53 | PATH_TYPE@[67; 74) | ||
54 | PATH@[67; 74) | ||
55 | PATH_SEGMENT@[67; 74) | ||
56 | COLONCOLON@[67; 69) | ||
57 | NAME_REF@[69; 74) | ||
58 | IDENT@[69; 74) "c_int" | ||
59 | R_PAREN@[74; 75) | ||
60 | WHITESPACE@[75; 76) | ||
61 | RET_TYPE@[76; 86) | ||
62 | THIN_ARROW@[76; 78) | ||
63 | WHITESPACE@[78; 79) | ||
64 | PATH_TYPE@[79; 86) | ||
65 | PATH@[79; 86) | ||
66 | PATH_SEGMENT@[79; 86) | ||
67 | COLONCOLON@[79; 81) | ||
68 | NAME_REF@[81; 86) | ||
69 | IDENT@[81; 86) "c_int" | ||
70 | SEMI@[86; 87) | ||
71 | WHITESPACE@[87; 92) | ||
72 | FN_DEF@[92; 167) | ||
73 | VISIBILITY@[92; 95) | ||
74 | PUB_KW@[92; 95) | ||
75 | WHITESPACE@[95; 96) | ||
76 | FN_KW@[96; 98) | ||
77 | WHITESPACE@[98; 99) | ||
78 | NAME@[99; 103) | ||
79 | IDENT@[99; 103) "bind" | ||
80 | PARAM_LIST@[103; 155) | ||
81 | L_PAREN@[103; 104) | ||
82 | PARAM@[104; 115) | ||
83 | BIND_PAT@[104; 106) | ||
84 | NAME@[104; 106) | ||
85 | IDENT@[104; 106) "fd" | ||
86 | COLON@[106; 107) | ||
87 | WHITESPACE@[107; 108) | ||
88 | PATH_TYPE@[108; 115) | ||
89 | PATH@[108; 115) | ||
90 | PATH_SEGMENT@[108; 115) | ||
91 | COLONCOLON@[108; 110) | ||
92 | NAME_REF@[110; 115) | ||
93 | IDENT@[110; 115) "c_int" | ||
94 | COMMA@[115; 116) | ||
95 | WHITESPACE@[116; 117) | ||
96 | PARAM@[117; 138) | ||
97 | BIND_PAT@[117; 121) | ||
98 | NAME@[117; 121) | ||
99 | IDENT@[117; 121) "addr" | ||
100 | COLON@[121; 122) | ||
101 | WHITESPACE@[122; 123) | ||
102 | POINTER_TYPE@[123; 138) | ||
103 | STAR@[123; 124) | ||
104 | CONST_KW@[124; 129) | ||
105 | WHITESPACE@[129; 130) | ||
106 | PATH_TYPE@[130; 138) | ||
107 | PATH@[130; 138) | ||
108 | PATH_SEGMENT@[130; 138) | ||
109 | NAME_REF@[130; 138) | ||
110 | IDENT@[130; 138) "sockaddr" | ||
111 | COMMA@[138; 139) | ||
112 | WHITESPACE@[139; 140) | ||
113 | PARAM@[140; 154) | ||
114 | BIND_PAT@[140; 143) | ||
115 | NAME@[140; 143) | ||
116 | IDENT@[140; 143) "len" | ||
117 | COLON@[143; 144) | ||
118 | WHITESPACE@[144; 145) | ||
119 | PATH_TYPE@[145; 154) | ||
120 | PATH@[145; 154) | ||
121 | PATH_SEGMENT@[145; 154) | ||
122 | NAME_REF@[145; 154) | ||
123 | IDENT@[145; 154) "socklen_t" | ||
124 | R_PAREN@[154; 155) | ||
125 | WHITESPACE@[155; 156) | ||
126 | RET_TYPE@[156; 166) | ||
127 | THIN_ARROW@[156; 158) | ||
128 | WHITESPACE@[158; 159) | ||
129 | PATH_TYPE@[159; 166) | ||
130 | PATH@[159; 166) | ||
131 | PATH_SEGMENT@[159; 166) | ||
132 | COLONCOLON@[159; 161) | ||
133 | NAME_REF@[161; 166) | ||
134 | IDENT@[161; 166) "c_int" | ||
135 | SEMI@[166; 167) | ||
136 | WHITESPACE@[167; 172) | ||
137 | FN_DEF@[172; 276) | ||
138 | VISIBILITY@[172; 175) | ||
139 | PUB_KW@[172; 175) | ||
140 | WHITESPACE@[175; 176) | ||
141 | FN_KW@[176; 178) | ||
142 | WHITESPACE@[178; 179) | ||
143 | NAME@[179; 186) | ||
144 | IDENT@[179; 186) "connect" | ||
145 | PARAM_LIST@[186; 264) | ||
146 | L_PAREN@[186; 187) | ||
147 | PARAM@[187; 202) | ||
148 | BIND_PAT@[187; 193) | ||
149 | NAME@[187; 193) | ||
150 | IDENT@[187; 193) "socket" | ||
151 | COLON@[193; 194) | ||
152 | WHITESPACE@[194; 195) | ||
153 | PATH_TYPE@[195; 202) | ||
154 | PATH@[195; 202) | ||
155 | PATH_SEGMENT@[195; 202) | ||
156 | COLONCOLON@[195; 197) | ||
157 | NAME_REF@[197; 202) | ||
158 | IDENT@[197; 202) "c_int" | ||
159 | COMMA@[202; 203) | ||
160 | WHITESPACE@[203; 204) | ||
161 | PARAM@[204; 228) | ||
162 | BIND_PAT@[204; 211) | ||
163 | NAME@[204; 211) | ||
164 | IDENT@[204; 211) "address" | ||
165 | COLON@[211; 212) | ||
166 | WHITESPACE@[212; 213) | ||
167 | POINTER_TYPE@[213; 228) | ||
168 | STAR@[213; 214) | ||
169 | CONST_KW@[214; 219) | ||
170 | WHITESPACE@[219; 220) | ||
171 | PATH_TYPE@[220; 228) | ||
172 | PATH@[220; 228) | ||
173 | PATH_SEGMENT@[220; 228) | ||
174 | NAME_REF@[220; 228) | ||
175 | IDENT@[220; 228) "sockaddr" | ||
176 | COMMA@[228; 229) | ||
177 | WHITESPACE@[229; 249) | ||
178 | PARAM@[249; 263) | ||
179 | BIND_PAT@[249; 252) | ||
180 | NAME@[249; 252) | ||
181 | IDENT@[249; 252) "len" | ||
182 | COLON@[252; 253) | ||
183 | WHITESPACE@[253; 254) | ||
184 | PATH_TYPE@[254; 263) | ||
185 | PATH@[254; 263) | ||
186 | PATH_SEGMENT@[254; 263) | ||
187 | NAME_REF@[254; 263) | ||
188 | IDENT@[254; 263) "socklen_t" | ||
189 | R_PAREN@[263; 264) | ||
190 | WHITESPACE@[264; 265) | ||
191 | RET_TYPE@[265; 275) | ||
192 | THIN_ARROW@[265; 267) | ||
193 | WHITESPACE@[267; 268) | ||
194 | PATH_TYPE@[268; 275) | ||
195 | PATH@[268; 275) | ||
196 | PATH_SEGMENT@[268; 275) | ||
197 | COLONCOLON@[268; 270) | ||
198 | NAME_REF@[270; 275) | ||
199 | IDENT@[270; 275) "c_int" | ||
200 | SEMI@[275; 276) | ||
201 | WHITESPACE@[276; 281) | ||
202 | FN_DEF@[281; 341) | ||
203 | VISIBILITY@[281; 284) | ||
204 | PUB_KW@[281; 284) | ||
205 | WHITESPACE@[284; 285) | ||
206 | FN_KW@[285; 287) | ||
207 | WHITESPACE@[287; 288) | ||
208 | NAME@[288; 294) | ||
209 | IDENT@[288; 294) "listen" | ||
210 | PARAM_LIST@[294; 329) | ||
211 | L_PAREN@[294; 295) | ||
212 | PARAM@[295; 310) | ||
213 | BIND_PAT@[295; 301) | ||
214 | NAME@[295; 301) | ||
215 | IDENT@[295; 301) "socket" | ||
216 | COLON@[301; 302) | ||
217 | WHITESPACE@[302; 303) | ||
218 | PATH_TYPE@[303; 310) | ||
219 | PATH@[303; 310) | ||
220 | PATH_SEGMENT@[303; 310) | ||
221 | COLONCOLON@[303; 305) | ||
222 | NAME_REF@[305; 310) | ||
223 | IDENT@[305; 310) "c_int" | ||
224 | COMMA@[310; 311) | ||
225 | WHITESPACE@[311; 312) | ||
226 | PARAM@[312; 328) | ||
227 | BIND_PAT@[312; 319) | ||
228 | NAME@[312; 319) | ||
229 | IDENT@[312; 319) "backlog" | ||
230 | COLON@[319; 320) | ||
231 | WHITESPACE@[320; 321) | ||
232 | PATH_TYPE@[321; 328) | ||
233 | PATH@[321; 328) | ||
234 | PATH_SEGMENT@[321; 328) | ||
235 | COLONCOLON@[321; 323) | ||
236 | NAME_REF@[323; 328) | ||
237 | IDENT@[323; 328) "c_int" | ||
238 | R_PAREN@[328; 329) | ||
239 | WHITESPACE@[329; 330) | ||
240 | RET_TYPE@[330; 340) | ||
241 | THIN_ARROW@[330; 332) | ||
242 | WHITESPACE@[332; 333) | ||
243 | PATH_TYPE@[333; 340) | ||
244 | PATH@[333; 340) | ||
245 | PATH_SEGMENT@[333; 340) | ||
246 | COLONCOLON@[333; 335) | ||
247 | NAME_REF@[335; 340) | ||
248 | IDENT@[335; 340) "c_int" | ||
249 | SEMI@[340; 341) | ||
250 | WHITESPACE@[341; 346) | ||
251 | FN_DEF@[346; 469) | ||
252 | VISIBILITY@[346; 349) | ||
253 | PUB_KW@[346; 349) | ||
254 | WHITESPACE@[349; 350) | ||
255 | FN_KW@[350; 352) | ||
256 | WHITESPACE@[352; 353) | ||
257 | NAME@[353; 364) | ||
258 | IDENT@[353; 364) "getsockname" | ||
259 | PARAM_LIST@[364; 457) | ||
260 | L_PAREN@[364; 365) | ||
261 | PARAM@[365; 380) | ||
262 | BIND_PAT@[365; 371) | ||
263 | NAME@[365; 371) | ||
264 | IDENT@[365; 371) "socket" | ||
265 | COLON@[371; 372) | ||
266 | WHITESPACE@[372; 373) | ||
267 | PATH_TYPE@[373; 380) | ||
268 | PATH@[373; 380) | ||
269 | PATH_SEGMENT@[373; 380) | ||
270 | COLONCOLON@[373; 375) | ||
271 | NAME_REF@[375; 380) | ||
272 | IDENT@[375; 380) "c_int" | ||
273 | COMMA@[380; 381) | ||
274 | WHITESPACE@[381; 382) | ||
275 | PARAM@[382; 404) | ||
276 | BIND_PAT@[382; 389) | ||
277 | NAME@[382; 389) | ||
278 | IDENT@[382; 389) "address" | ||
279 | COLON@[389; 390) | ||
280 | WHITESPACE@[390; 391) | ||
281 | POINTER_TYPE@[391; 404) | ||
282 | STAR@[391; 392) | ||
283 | MUT_KW@[392; 395) | ||
284 | WHITESPACE@[395; 396) | ||
285 | PATH_TYPE@[396; 404) | ||
286 | PATH@[396; 404) | ||
287 | PATH_SEGMENT@[396; 404) | ||
288 | NAME_REF@[396; 404) | ||
289 | IDENT@[396; 404) "sockaddr" | ||
290 | COMMA@[404; 405) | ||
291 | WHITESPACE@[405; 429) | ||
292 | PARAM@[429; 456) | ||
293 | BIND_PAT@[429; 440) | ||
294 | NAME@[429; 440) | ||
295 | IDENT@[429; 440) "address_len" | ||
296 | COLON@[440; 441) | ||
297 | WHITESPACE@[441; 442) | ||
298 | POINTER_TYPE@[442; 456) | ||
299 | STAR@[442; 443) | ||
300 | MUT_KW@[443; 446) | ||
301 | WHITESPACE@[446; 447) | ||
302 | PATH_TYPE@[447; 456) | ||
303 | PATH@[447; 456) | ||
304 | PATH_SEGMENT@[447; 456) | ||
305 | NAME_REF@[447; 456) | ||
306 | IDENT@[447; 456) "socklen_t" | ||
307 | R_PAREN@[456; 457) | ||
308 | WHITESPACE@[457; 458) | ||
309 | RET_TYPE@[458; 468) | ||
310 | THIN_ARROW@[458; 460) | ||
311 | WHITESPACE@[460; 461) | ||
312 | PATH_TYPE@[461; 468) | ||
313 | PATH@[461; 468) | ||
314 | PATH_SEGMENT@[461; 468) | ||
315 | COLONCOLON@[461; 463) | ||
316 | NAME_REF@[463; 468) | ||
317 | IDENT@[463; 468) "c_int" | ||
318 | SEMI@[468; 469) | ||
319 | WHITESPACE@[469; 474) | ||
320 | FN_DEF@[474; 691) | ||
321 | VISIBILITY@[474; 477) | ||
322 | PUB_KW@[474; 477) | ||
323 | WHITESPACE@[477; 478) | ||
324 | FN_KW@[478; 480) | ||
325 | WHITESPACE@[480; 481) | ||
326 | NAME@[481; 491) | ||
327 | IDENT@[481; 491) "getsockopt" | ||
328 | PARAM_LIST@[491; 679) | ||
329 | L_PAREN@[491; 492) | ||
330 | PARAM@[492; 507) | ||
331 | BIND_PAT@[492; 498) | ||
332 | NAME@[492; 498) | ||
333 | IDENT@[492; 498) "sockfd" | ||
334 | COLON@[498; 499) | ||
335 | WHITESPACE@[499; 500) | ||
336 | PATH_TYPE@[500; 507) | ||
337 | PATH@[500; 507) | ||
338 | PATH_SEGMENT@[500; 507) | ||
339 | COLONCOLON@[500; 502) | ||
340 | NAME_REF@[502; 507) | ||
341 | IDENT@[502; 507) "c_int" | ||
342 | COMMA@[507; 508) | ||
343 | WHITESPACE@[508; 531) | ||
344 | PARAM@[531; 545) | ||
345 | BIND_PAT@[531; 536) | ||
346 | NAME@[531; 536) | ||
347 | IDENT@[531; 536) "level" | ||
348 | COLON@[536; 537) | ||
349 | WHITESPACE@[537; 538) | ||
350 | PATH_TYPE@[538; 545) | ||
351 | PATH@[538; 545) | ||
352 | PATH_SEGMENT@[538; 545) | ||
353 | COLONCOLON@[538; 540) | ||
354 | NAME_REF@[540; 545) | ||
355 | IDENT@[540; 545) "c_int" | ||
356 | COMMA@[545; 546) | ||
357 | WHITESPACE@[546; 569) | ||
358 | PARAM@[569; 585) | ||
359 | BIND_PAT@[569; 576) | ||
360 | NAME@[569; 576) | ||
361 | IDENT@[569; 576) "optname" | ||
362 | COLON@[576; 577) | ||
363 | WHITESPACE@[577; 578) | ||
364 | PATH_TYPE@[578; 585) | ||
365 | PATH@[578; 585) | ||
366 | PATH_SEGMENT@[578; 585) | ||
367 | COLONCOLON@[578; 580) | ||
368 | NAME_REF@[580; 585) | ||
369 | IDENT@[580; 585) "c_int" | ||
370 | COMMA@[585; 586) | ||
371 | WHITESPACE@[586; 609) | ||
372 | PARAM@[609; 630) | ||
373 | BIND_PAT@[609; 615) | ||
374 | NAME@[609; 615) | ||
375 | IDENT@[609; 615) "optval" | ||
376 | COLON@[615; 616) | ||
377 | WHITESPACE@[616; 617) | ||
378 | POINTER_TYPE@[617; 630) | ||
379 | STAR@[617; 618) | ||
380 | MUT_KW@[618; 621) | ||
381 | WHITESPACE@[621; 622) | ||
382 | PATH_TYPE@[622; 630) | ||
383 | PATH@[622; 630) | ||
384 | PATH_SEGMENT@[622; 630) | ||
385 | COLONCOLON@[622; 624) | ||
386 | NAME_REF@[624; 630) | ||
387 | IDENT@[624; 630) "c_void" | ||
388 | COMMA@[630; 631) | ||
389 | WHITESPACE@[631; 654) | ||
390 | PARAM@[654; 678) | ||
391 | BIND_PAT@[654; 660) | ||
392 | NAME@[654; 660) | ||
393 | IDENT@[654; 660) "optlen" | ||
394 | COLON@[660; 661) | ||
395 | WHITESPACE@[661; 662) | ||
396 | POINTER_TYPE@[662; 678) | ||
397 | STAR@[662; 663) | ||
398 | MUT_KW@[663; 666) | ||
399 | WHITESPACE@[666; 667) | ||
400 | PATH_TYPE@[667; 678) | ||
401 | PATH@[667; 678) | ||
402 | PATH_SEGMENT@[667; 678) | ||
403 | COLONCOLON@[667; 669) | ||
404 | NAME_REF@[669; 678) | ||
405 | IDENT@[669; 678) "socklen_t" | ||
406 | R_PAREN@[678; 679) | ||
407 | WHITESPACE@[679; 680) | ||
408 | RET_TYPE@[680; 690) | ||
409 | THIN_ARROW@[680; 682) | ||
410 | WHITESPACE@[682; 683) | ||
411 | PATH_TYPE@[683; 690) | ||
412 | PATH@[683; 690) | ||
413 | PATH_SEGMENT@[683; 690) | ||
414 | COLONCOLON@[683; 685) | ||
415 | NAME_REF@[685; 690) | ||
416 | IDENT@[685; 690) "c_int" | ||
417 | SEMI@[690; 691) | ||
418 | WHITESPACE@[691; 696) | ||
419 | FN_DEF@[696; 864) | ||
420 | VISIBILITY@[696; 699) | ||
421 | PUB_KW@[696; 699) | ||
422 | WHITESPACE@[699; 700) | ||
423 | FN_KW@[700; 702) | ||
424 | WHITESPACE@[702; 703) | ||
425 | NAME@[703; 713) | ||
426 | IDENT@[703; 713) "setsockopt" | ||
427 | PARAM_LIST@[713; 852) | ||
428 | L_PAREN@[713; 714) | ||
429 | PARAM@[714; 729) | ||
430 | BIND_PAT@[714; 720) | ||
431 | NAME@[714; 720) | ||
432 | IDENT@[714; 720) "socket" | ||
433 | COLON@[720; 721) | ||
434 | WHITESPACE@[721; 722) | ||
435 | PATH_TYPE@[722; 729) | ||
436 | PATH@[722; 729) | ||
437 | PATH_SEGMENT@[722; 729) | ||
438 | COLONCOLON@[722; 724) | ||
439 | NAME_REF@[724; 729) | ||
440 | IDENT@[724; 729) "c_int" | ||
441 | COMMA@[729; 730) | ||
442 | WHITESPACE@[730; 731) | ||
443 | PARAM@[731; 745) | ||
444 | BIND_PAT@[731; 736) | ||
445 | NAME@[731; 736) | ||
446 | IDENT@[731; 736) "level" | ||
447 | COLON@[736; 737) | ||
448 | WHITESPACE@[737; 738) | ||
449 | PATH_TYPE@[738; 745) | ||
450 | PATH@[738; 745) | ||
451 | PATH_SEGMENT@[738; 745) | ||
452 | COLONCOLON@[738; 740) | ||
453 | NAME_REF@[740; 745) | ||
454 | IDENT@[740; 745) "c_int" | ||
455 | COMMA@[745; 746) | ||
456 | WHITESPACE@[746; 747) | ||
457 | PARAM@[747; 760) | ||
458 | BIND_PAT@[747; 751) | ||
459 | NAME@[747; 751) | ||
460 | IDENT@[747; 751) "name" | ||
461 | COLON@[751; 752) | ||
462 | WHITESPACE@[752; 753) | ||
463 | PATH_TYPE@[753; 760) | ||
464 | PATH@[753; 760) | ||
465 | PATH_SEGMENT@[753; 760) | ||
466 | COLONCOLON@[753; 755) | ||
467 | NAME_REF@[755; 760) | ||
468 | IDENT@[755; 760) "c_int" | ||
469 | COMMA@[760; 761) | ||
470 | WHITESPACE@[761; 784) | ||
471 | PARAM@[784; 806) | ||
472 | BIND_PAT@[784; 789) | ||
473 | NAME@[784; 789) | ||
474 | IDENT@[784; 789) "value" | ||
475 | COLON@[789; 790) | ||
476 | WHITESPACE@[790; 791) | ||
477 | POINTER_TYPE@[791; 806) | ||
478 | STAR@[791; 792) | ||
479 | CONST_KW@[792; 797) | ||
480 | WHITESPACE@[797; 798) | ||
481 | PATH_TYPE@[798; 806) | ||
482 | PATH@[798; 806) | ||
483 | PATH_SEGMENT@[798; 806) | ||
484 | COLONCOLON@[798; 800) | ||
485 | NAME_REF@[800; 806) | ||
486 | IDENT@[800; 806) "c_void" | ||
487 | COMMA@[806; 807) | ||
488 | WHITESPACE@[807; 830) | ||
489 | PARAM@[830; 851) | ||
490 | BIND_PAT@[830; 840) | ||
491 | NAME@[830; 840) | ||
492 | IDENT@[830; 840) "option_len" | ||
493 | COLON@[840; 841) | ||
494 | WHITESPACE@[841; 842) | ||
495 | PATH_TYPE@[842; 851) | ||
496 | PATH@[842; 851) | ||
497 | PATH_SEGMENT@[842; 851) | ||
498 | NAME_REF@[842; 851) | ||
499 | IDENT@[842; 851) "socklen_t" | ||
500 | R_PAREN@[851; 852) | ||
501 | WHITESPACE@[852; 853) | ||
502 | RET_TYPE@[853; 863) | ||
503 | THIN_ARROW@[853; 855) | ||
504 | WHITESPACE@[855; 856) | ||
505 | PATH_TYPE@[856; 863) | ||
506 | PATH@[856; 863) | ||
507 | PATH_SEGMENT@[856; 863) | ||
508 | COLONCOLON@[856; 858) | ||
509 | NAME_REF@[858; 863) | ||
510 | IDENT@[858; 863) "c_int" | ||
511 | SEMI@[863; 864) | ||
512 | WHITESPACE@[864; 869) | ||
513 | FN_DEF@[869; 992) | ||
514 | VISIBILITY@[869; 872) | ||
515 | PUB_KW@[869; 872) | ||
516 | WHITESPACE@[872; 873) | ||
517 | FN_KW@[873; 875) | ||
518 | WHITESPACE@[875; 876) | ||
519 | NAME@[876; 887) | ||
520 | IDENT@[876; 887) "getpeername" | ||
521 | PARAM_LIST@[887; 980) | ||
522 | L_PAREN@[887; 888) | ||
523 | PARAM@[888; 903) | ||
524 | BIND_PAT@[888; 894) | ||
525 | NAME@[888; 894) | ||
526 | IDENT@[888; 894) "socket" | ||
527 | COLON@[894; 895) | ||
528 | WHITESPACE@[895; 896) | ||
529 | PATH_TYPE@[896; 903) | ||
530 | PATH@[896; 903) | ||
531 | PATH_SEGMENT@[896; 903) | ||
532 | COLONCOLON@[896; 898) | ||
533 | NAME_REF@[898; 903) | ||
534 | IDENT@[898; 903) "c_int" | ||
535 | COMMA@[903; 904) | ||
536 | WHITESPACE@[904; 905) | ||
537 | PARAM@[905; 927) | ||
538 | BIND_PAT@[905; 912) | ||
539 | NAME@[905; 912) | ||
540 | IDENT@[905; 912) "address" | ||
541 | COLON@[912; 913) | ||
542 | WHITESPACE@[913; 914) | ||
543 | POINTER_TYPE@[914; 927) | ||
544 | STAR@[914; 915) | ||
545 | MUT_KW@[915; 918) | ||
546 | WHITESPACE@[918; 919) | ||
547 | PATH_TYPE@[919; 927) | ||
548 | PATH@[919; 927) | ||
549 | PATH_SEGMENT@[919; 927) | ||
550 | NAME_REF@[919; 927) | ||
551 | IDENT@[919; 927) "sockaddr" | ||
552 | COMMA@[927; 928) | ||
553 | WHITESPACE@[928; 952) | ||
554 | PARAM@[952; 979) | ||
555 | BIND_PAT@[952; 963) | ||
556 | NAME@[952; 963) | ||
557 | IDENT@[952; 963) "address_len" | ||
558 | COLON@[963; 964) | ||
559 | WHITESPACE@[964; 965) | ||
560 | POINTER_TYPE@[965; 979) | ||
561 | STAR@[965; 966) | ||
562 | MUT_KW@[966; 969) | ||
563 | WHITESPACE@[969; 970) | ||
564 | PATH_TYPE@[970; 979) | ||
565 | PATH@[970; 979) | ||
566 | PATH_SEGMENT@[970; 979) | ||
567 | NAME_REF@[970; 979) | ||
568 | IDENT@[970; 979) "socklen_t" | ||
569 | R_PAREN@[979; 980) | ||
570 | WHITESPACE@[980; 981) | ||
571 | RET_TYPE@[981; 991) | ||
572 | THIN_ARROW@[981; 983) | ||
573 | WHITESPACE@[983; 984) | ||
574 | PATH_TYPE@[984; 991) | ||
575 | PATH@[984; 991) | ||
576 | PATH_SEGMENT@[984; 991) | ||
577 | COLONCOLON@[984; 986) | ||
578 | NAME_REF@[986; 991) | ||
579 | IDENT@[986; 991) "c_int" | ||
580 | SEMI@[991; 992) | ||
581 | WHITESPACE@[992; 997) | ||
582 | FN_DEF@[997; 1173) | ||
583 | VISIBILITY@[997; 1000) | ||
584 | PUB_KW@[997; 1000) | ||
585 | WHITESPACE@[1000; 1001) | ||
586 | FN_KW@[1001; 1003) | ||
587 | WHITESPACE@[1003; 1004) | ||
588 | NAME@[1004; 1010) | ||
589 | IDENT@[1004; 1010) "sendto" | ||
590 | PARAM_LIST@[1010; 1159) | ||
591 | L_PAREN@[1010; 1011) | ||
592 | PARAM@[1011; 1026) | ||
593 | BIND_PAT@[1011; 1017) | ||
594 | NAME@[1011; 1017) | ||
595 | IDENT@[1011; 1017) "socket" | ||
596 | COLON@[1017; 1018) | ||
597 | WHITESPACE@[1018; 1019) | ||
598 | PATH_TYPE@[1019; 1026) | ||
599 | PATH@[1019; 1026) | ||
600 | PATH_SEGMENT@[1019; 1026) | ||
601 | COLONCOLON@[1019; 1021) | ||
602 | NAME_REF@[1021; 1026) | ||
603 | IDENT@[1021; 1026) "c_int" | ||
604 | COMMA@[1026; 1027) | ||
605 | WHITESPACE@[1027; 1028) | ||
606 | PARAM@[1028; 1048) | ||
607 | BIND_PAT@[1028; 1031) | ||
608 | NAME@[1028; 1031) | ||
609 | IDENT@[1028; 1031) "buf" | ||
610 | COLON@[1031; 1032) | ||
611 | WHITESPACE@[1032; 1033) | ||
612 | POINTER_TYPE@[1033; 1048) | ||
613 | STAR@[1033; 1034) | ||
614 | CONST_KW@[1034; 1039) | ||
615 | WHITESPACE@[1039; 1040) | ||
616 | PATH_TYPE@[1040; 1048) | ||
617 | PATH@[1040; 1048) | ||
618 | PATH_SEGMENT@[1040; 1048) | ||
619 | COLONCOLON@[1040; 1042) | ||
620 | NAME_REF@[1042; 1048) | ||
621 | IDENT@[1042; 1048) "c_void" | ||
622 | COMMA@[1048; 1049) | ||
623 | WHITESPACE@[1049; 1050) | ||
624 | PARAM@[1050; 1063) | ||
625 | BIND_PAT@[1050; 1053) | ||
626 | NAME@[1050; 1053) | ||
627 | IDENT@[1050; 1053) "len" | ||
628 | COLON@[1053; 1054) | ||
629 | WHITESPACE@[1054; 1055) | ||
630 | PATH_TYPE@[1055; 1063) | ||
631 | PATH@[1055; 1063) | ||
632 | PATH_SEGMENT@[1055; 1063) | ||
633 | COLONCOLON@[1055; 1057) | ||
634 | NAME_REF@[1057; 1063) | ||
635 | IDENT@[1057; 1063) "size_t" | ||
636 | COMMA@[1063; 1064) | ||
637 | WHITESPACE@[1064; 1083) | ||
638 | PARAM@[1083; 1097) | ||
639 | BIND_PAT@[1083; 1088) | ||
640 | NAME@[1083; 1088) | ||
641 | IDENT@[1083; 1088) "flags" | ||
642 | COLON@[1088; 1089) | ||
643 | WHITESPACE@[1089; 1090) | ||
644 | PATH_TYPE@[1090; 1097) | ||
645 | PATH@[1090; 1097) | ||
646 | PATH_SEGMENT@[1090; 1097) | ||
647 | COLONCOLON@[1090; 1092) | ||
648 | NAME_REF@[1092; 1097) | ||
649 | IDENT@[1092; 1097) "c_int" | ||
650 | COMMA@[1097; 1098) | ||
651 | WHITESPACE@[1098; 1099) | ||
652 | PARAM@[1099; 1120) | ||
653 | BIND_PAT@[1099; 1103) | ||
654 | NAME@[1099; 1103) | ||
655 | IDENT@[1099; 1103) "addr" | ||
656 | COLON@[1103; 1104) | ||
657 | WHITESPACE@[1104; 1105) | ||
658 | POINTER_TYPE@[1105; 1120) | ||
659 | STAR@[1105; 1106) | ||
660 | CONST_KW@[1106; 1111) | ||
661 | WHITESPACE@[1111; 1112) | ||
662 | PATH_TYPE@[1112; 1120) | ||
663 | PATH@[1112; 1120) | ||
664 | PATH_SEGMENT@[1112; 1120) | ||
665 | NAME_REF@[1112; 1120) | ||
666 | IDENT@[1112; 1120) "sockaddr" | ||
667 | COMMA@[1120; 1121) | ||
668 | WHITESPACE@[1121; 1140) | ||
669 | PARAM@[1140; 1158) | ||
670 | BIND_PAT@[1140; 1147) | ||
671 | NAME@[1140; 1147) | ||
672 | IDENT@[1140; 1147) "addrlen" | ||
673 | COLON@[1147; 1148) | ||
674 | WHITESPACE@[1148; 1149) | ||
675 | PATH_TYPE@[1149; 1158) | ||
676 | PATH@[1149; 1158) | ||
677 | PATH_SEGMENT@[1149; 1158) | ||
678 | NAME_REF@[1149; 1158) | ||
679 | IDENT@[1149; 1158) "socklen_t" | ||
680 | R_PAREN@[1158; 1159) | ||
681 | WHITESPACE@[1159; 1160) | ||
682 | RET_TYPE@[1160; 1172) | ||
683 | THIN_ARROW@[1160; 1162) | ||
684 | WHITESPACE@[1162; 1163) | ||
685 | PATH_TYPE@[1163; 1172) | ||
686 | PATH@[1163; 1172) | ||
687 | PATH_SEGMENT@[1163; 1172) | ||
688 | COLONCOLON@[1163; 1165) | ||
689 | NAME_REF@[1165; 1172) | ||
690 | IDENT@[1165; 1172) "ssize_t" | ||
691 | SEMI@[1172; 1173) | ||
692 | WHITESPACE@[1173; 1178) | ||
693 | FN_DEF@[1178; 1289) | ||
694 | VISIBILITY@[1178; 1181) | ||
695 | PUB_KW@[1178; 1181) | ||
696 | WHITESPACE@[1181; 1182) | ||
697 | FN_KW@[1182; 1184) | ||
698 | WHITESPACE@[1184; 1185) | ||
699 | NAME@[1185; 1189) | ||
700 | IDENT@[1185; 1189) "send" | ||
701 | PARAM_LIST@[1189; 1275) | ||
702 | L_PAREN@[1189; 1190) | ||
703 | PARAM@[1190; 1205) | ||
704 | BIND_PAT@[1190; 1196) | ||
705 | NAME@[1190; 1196) | ||
706 | IDENT@[1190; 1196) "socket" | ||
707 | COLON@[1196; 1197) | ||
708 | WHITESPACE@[1197; 1198) | ||
709 | PATH_TYPE@[1198; 1205) | ||
710 | PATH@[1198; 1205) | ||
711 | PATH_SEGMENT@[1198; 1205) | ||
712 | COLONCOLON@[1198; 1200) | ||
713 | NAME_REF@[1200; 1205) | ||
714 | IDENT@[1200; 1205) "c_int" | ||
715 | COMMA@[1205; 1206) | ||
716 | WHITESPACE@[1206; 1207) | ||
717 | PARAM@[1207; 1227) | ||
718 | BIND_PAT@[1207; 1210) | ||
719 | NAME@[1207; 1210) | ||
720 | IDENT@[1207; 1210) "buf" | ||
721 | COLON@[1210; 1211) | ||
722 | WHITESPACE@[1211; 1212) | ||
723 | POINTER_TYPE@[1212; 1227) | ||
724 | STAR@[1212; 1213) | ||
725 | CONST_KW@[1213; 1218) | ||
726 | WHITESPACE@[1218; 1219) | ||
727 | PATH_TYPE@[1219; 1227) | ||
728 | PATH@[1219; 1227) | ||
729 | PATH_SEGMENT@[1219; 1227) | ||
730 | COLONCOLON@[1219; 1221) | ||
731 | NAME_REF@[1221; 1227) | ||
732 | IDENT@[1221; 1227) "c_void" | ||
733 | COMMA@[1227; 1228) | ||
734 | WHITESPACE@[1228; 1229) | ||
735 | PARAM@[1229; 1242) | ||
736 | BIND_PAT@[1229; 1232) | ||
737 | NAME@[1229; 1232) | ||
738 | IDENT@[1229; 1232) "len" | ||
739 | COLON@[1232; 1233) | ||
740 | WHITESPACE@[1233; 1234) | ||
741 | PATH_TYPE@[1234; 1242) | ||
742 | PATH@[1234; 1242) | ||
743 | PATH_SEGMENT@[1234; 1242) | ||
744 | COLONCOLON@[1234; 1236) | ||
745 | NAME_REF@[1236; 1242) | ||
746 | IDENT@[1236; 1242) "size_t" | ||
747 | COMMA@[1242; 1243) | ||
748 | WHITESPACE@[1243; 1260) | ||
749 | PARAM@[1260; 1274) | ||
750 | BIND_PAT@[1260; 1265) | ||
751 | NAME@[1260; 1265) | ||
752 | IDENT@[1260; 1265) "flags" | ||
753 | COLON@[1265; 1266) | ||
754 | WHITESPACE@[1266; 1267) | ||
755 | PATH_TYPE@[1267; 1274) | ||
756 | PATH@[1267; 1274) | ||
757 | PATH_SEGMENT@[1267; 1274) | ||
758 | COLONCOLON@[1267; 1269) | ||
759 | NAME_REF@[1269; 1274) | ||
760 | IDENT@[1269; 1274) "c_int" | ||
761 | R_PAREN@[1274; 1275) | ||
762 | WHITESPACE@[1275; 1276) | ||
763 | RET_TYPE@[1276; 1288) | ||
764 | THIN_ARROW@[1276; 1278) | ||
765 | WHITESPACE@[1278; 1279) | ||
766 | PATH_TYPE@[1279; 1288) | ||
767 | PATH@[1279; 1288) | ||
768 | PATH_SEGMENT@[1279; 1288) | ||
769 | COLONCOLON@[1279; 1281) | ||
770 | NAME_REF@[1281; 1288) | ||
771 | IDENT@[1281; 1288) "ssize_t" | ||
772 | SEMI@[1288; 1289) | ||
773 | WHITESPACE@[1289; 1294) | ||
774 | FN_DEF@[1294; 1481) | ||
775 | VISIBILITY@[1294; 1297) | ||
776 | PUB_KW@[1294; 1297) | ||
777 | WHITESPACE@[1297; 1298) | ||
778 | FN_KW@[1298; 1300) | ||
779 | WHITESPACE@[1300; 1301) | ||
780 | NAME@[1301; 1309) | ||
781 | IDENT@[1301; 1309) "recvfrom" | ||
782 | PARAM_LIST@[1309; 1467) | ||
783 | L_PAREN@[1309; 1310) | ||
784 | PARAM@[1310; 1325) | ||
785 | BIND_PAT@[1310; 1316) | ||
786 | NAME@[1310; 1316) | ||
787 | IDENT@[1310; 1316) "socket" | ||
788 | COLON@[1316; 1317) | ||
789 | WHITESPACE@[1317; 1318) | ||
790 | PATH_TYPE@[1318; 1325) | ||
791 | PATH@[1318; 1325) | ||
792 | PATH_SEGMENT@[1318; 1325) | ||
793 | COLONCOLON@[1318; 1320) | ||
794 | NAME_REF@[1320; 1325) | ||
795 | IDENT@[1320; 1325) "c_int" | ||
796 | COMMA@[1325; 1326) | ||
797 | WHITESPACE@[1326; 1327) | ||
798 | PARAM@[1327; 1345) | ||
799 | BIND_PAT@[1327; 1330) | ||
800 | NAME@[1327; 1330) | ||
801 | IDENT@[1327; 1330) "buf" | ||
802 | COLON@[1330; 1331) | ||
803 | WHITESPACE@[1331; 1332) | ||
804 | POINTER_TYPE@[1332; 1345) | ||
805 | STAR@[1332; 1333) | ||
806 | MUT_KW@[1333; 1336) | ||
807 | WHITESPACE@[1336; 1337) | ||
808 | PATH_TYPE@[1337; 1345) | ||
809 | PATH@[1337; 1345) | ||
810 | PATH_SEGMENT@[1337; 1345) | ||
811 | COLONCOLON@[1337; 1339) | ||
812 | NAME_REF@[1339; 1345) | ||
813 | IDENT@[1339; 1345) "c_void" | ||
814 | COMMA@[1345; 1346) | ||
815 | WHITESPACE@[1346; 1347) | ||
816 | PARAM@[1347; 1360) | ||
817 | BIND_PAT@[1347; 1350) | ||
818 | NAME@[1347; 1350) | ||
819 | IDENT@[1347; 1350) "len" | ||
820 | COLON@[1350; 1351) | ||
821 | WHITESPACE@[1351; 1352) | ||
822 | PATH_TYPE@[1352; 1360) | ||
823 | PATH@[1352; 1360) | ||
824 | PATH_SEGMENT@[1352; 1360) | ||
825 | COLONCOLON@[1352; 1354) | ||
826 | NAME_REF@[1354; 1360) | ||
827 | IDENT@[1354; 1360) "size_t" | ||
828 | COMMA@[1360; 1361) | ||
829 | WHITESPACE@[1361; 1382) | ||
830 | PARAM@[1382; 1396) | ||
831 | BIND_PAT@[1382; 1387) | ||
832 | NAME@[1382; 1387) | ||
833 | IDENT@[1382; 1387) "flags" | ||
834 | COLON@[1387; 1388) | ||
835 | WHITESPACE@[1388; 1389) | ||
836 | PATH_TYPE@[1389; 1396) | ||
837 | PATH@[1389; 1396) | ||
838 | PATH_SEGMENT@[1389; 1396) | ||
839 | COLONCOLON@[1389; 1391) | ||
840 | NAME_REF@[1391; 1396) | ||
841 | IDENT@[1391; 1396) "c_int" | ||
842 | COMMA@[1396; 1397) | ||
843 | WHITESPACE@[1397; 1398) | ||
844 | PARAM@[1398; 1419) | ||
845 | BIND_PAT@[1398; 1402) | ||
846 | NAME@[1398; 1402) | ||
847 | IDENT@[1398; 1402) "addr" | ||
848 | COLON@[1402; 1403) | ||
849 | WHITESPACE@[1403; 1404) | ||
850 | POINTER_TYPE@[1404; 1419) | ||
851 | STAR@[1404; 1405) | ||
852 | MUT_KW@[1405; 1408) | ||
853 | WHITESPACE@[1408; 1409) | ||
854 | PATH_TYPE@[1409; 1419) | ||
855 | PATH@[1409; 1419) | ||
856 | PATH_SEGMENT@[1409; 1419) | ||
857 | COLONCOLON@[1409; 1411) | ||
858 | NAME_REF@[1411; 1419) | ||
859 | IDENT@[1411; 1419) "sockaddr" | ||
860 | COMMA@[1419; 1420) | ||
861 | WHITESPACE@[1420; 1441) | ||
862 | PARAM@[1441; 1466) | ||
863 | BIND_PAT@[1441; 1448) | ||
864 | NAME@[1441; 1448) | ||
865 | IDENT@[1441; 1448) "addrlen" | ||
866 | COLON@[1448; 1449) | ||
867 | WHITESPACE@[1449; 1450) | ||
868 | POINTER_TYPE@[1450; 1466) | ||
869 | STAR@[1450; 1451) | ||
870 | MUT_KW@[1451; 1454) | ||
871 | WHITESPACE@[1454; 1455) | ||
872 | PATH_TYPE@[1455; 1466) | ||
873 | PATH@[1455; 1466) | ||
874 | PATH_SEGMENT@[1455; 1466) | ||
875 | COLONCOLON@[1455; 1457) | ||
876 | NAME_REF@[1457; 1466) | ||
877 | IDENT@[1457; 1466) "socklen_t" | ||
878 | R_PAREN@[1466; 1467) | ||
879 | WHITESPACE@[1467; 1468) | ||
880 | RET_TYPE@[1468; 1480) | ||
881 | THIN_ARROW@[1468; 1470) | ||
882 | WHITESPACE@[1470; 1471) | ||
883 | PATH_TYPE@[1471; 1480) | ||
884 | PATH@[1471; 1480) | ||
885 | PATH_SEGMENT@[1471; 1480) | ||
886 | COLONCOLON@[1471; 1473) | ||
887 | NAME_REF@[1473; 1480) | ||
888 | IDENT@[1473; 1480) "ssize_t" | ||
889 | SEMI@[1480; 1481) | ||
890 | WHITESPACE@[1481; 1486) | ||
891 | FN_DEF@[1486; 1595) | ||
892 | VISIBILITY@[1486; 1489) | ||
893 | PUB_KW@[1486; 1489) | ||
894 | WHITESPACE@[1489; 1490) | ||
895 | FN_KW@[1490; 1492) | ||
896 | WHITESPACE@[1492; 1493) | ||
897 | NAME@[1493; 1497) | ||
898 | IDENT@[1493; 1497) "recv" | ||
899 | PARAM_LIST@[1497; 1581) | ||
900 | L_PAREN@[1497; 1498) | ||
901 | PARAM@[1498; 1513) | ||
902 | BIND_PAT@[1498; 1504) | ||
903 | NAME@[1498; 1504) | ||
904 | IDENT@[1498; 1504) "socket" | ||
905 | COLON@[1504; 1505) | ||
906 | WHITESPACE@[1505; 1506) | ||
907 | PATH_TYPE@[1506; 1513) | ||
908 | PATH@[1506; 1513) | ||
909 | PATH_SEGMENT@[1506; 1513) | ||
910 | COLONCOLON@[1506; 1508) | ||
911 | NAME_REF@[1508; 1513) | ||
912 | IDENT@[1508; 1513) "c_int" | ||
913 | COMMA@[1513; 1514) | ||
914 | WHITESPACE@[1514; 1515) | ||
915 | PARAM@[1515; 1533) | ||
916 | BIND_PAT@[1515; 1518) | ||
917 | NAME@[1515; 1518) | ||
918 | IDENT@[1515; 1518) "buf" | ||
919 | COLON@[1518; 1519) | ||
920 | WHITESPACE@[1519; 1520) | ||
921 | POINTER_TYPE@[1520; 1533) | ||
922 | STAR@[1520; 1521) | ||
923 | MUT_KW@[1521; 1524) | ||
924 | WHITESPACE@[1524; 1525) | ||
925 | PATH_TYPE@[1525; 1533) | ||
926 | PATH@[1525; 1533) | ||
927 | PATH_SEGMENT@[1525; 1533) | ||
928 | COLONCOLON@[1525; 1527) | ||
929 | NAME_REF@[1527; 1533) | ||
930 | IDENT@[1527; 1533) "c_void" | ||
931 | COMMA@[1533; 1534) | ||
932 | WHITESPACE@[1534; 1535) | ||
933 | PARAM@[1535; 1548) | ||
934 | BIND_PAT@[1535; 1538) | ||
935 | NAME@[1535; 1538) | ||
936 | IDENT@[1535; 1538) "len" | ||
937 | COLON@[1538; 1539) | ||
938 | WHITESPACE@[1539; 1540) | ||
939 | PATH_TYPE@[1540; 1548) | ||
940 | PATH@[1540; 1548) | ||
941 | PATH_SEGMENT@[1540; 1548) | ||
942 | COLONCOLON@[1540; 1542) | ||
943 | NAME_REF@[1542; 1548) | ||
944 | IDENT@[1542; 1548) "size_t" | ||
945 | COMMA@[1548; 1549) | ||
946 | WHITESPACE@[1549; 1566) | ||
947 | PARAM@[1566; 1580) | ||
948 | BIND_PAT@[1566; 1571) | ||
949 | NAME@[1566; 1571) | ||
950 | IDENT@[1566; 1571) "flags" | ||
951 | COLON@[1571; 1572) | ||
952 | WHITESPACE@[1572; 1573) | ||
953 | PATH_TYPE@[1573; 1580) | ||
954 | PATH@[1573; 1580) | ||
955 | PATH_SEGMENT@[1573; 1580) | ||
956 | COLONCOLON@[1573; 1575) | ||
957 | NAME_REF@[1575; 1580) | ||
958 | IDENT@[1575; 1580) "c_int" | ||
959 | R_PAREN@[1580; 1581) | ||
960 | WHITESPACE@[1581; 1582) | ||
961 | RET_TYPE@[1582; 1594) | ||
962 | THIN_ARROW@[1582; 1584) | ||
963 | WHITESPACE@[1584; 1585) | ||
964 | PATH_TYPE@[1585; 1594) | ||
965 | PATH@[1585; 1594) | ||
966 | PATH_SEGMENT@[1585; 1594) | ||
967 | COLONCOLON@[1585; 1587) | ||
968 | NAME_REF@[1587; 1594) | ||
969 | IDENT@[1587; 1594) "ssize_t" | ||
970 | SEMI@[1594; 1595) | ||
971 | WHITESPACE@[1595; 1596) | ||
972 | R_CURLY@[1596; 1597) | ||
973 | WHITESPACE@[1597; 1598) | ||
diff --git a/crates/libsyntax2/tests/test/main.rs b/crates/libsyntax2/tests/test/main.rs index 9958c7ece..596f32216 100644 --- a/crates/libsyntax2/tests/test/main.rs +++ b/crates/libsyntax2/tests/test/main.rs | |||
@@ -26,7 +26,6 @@ fn lexer_tests() { | |||
26 | #[test] | 26 | #[test] |
27 | fn parser_tests() { | 27 | fn parser_tests() { |
28 | dir_tests(&["parser/inline", "parser/ok", "parser/err"], |text| { | 28 | dir_tests(&["parser/inline", "parser/ok", "parser/err"], |text| { |
29 | eprintln!("\n{}\n", text); | ||
30 | let file = File::parse(text); | 29 | let file = File::parse(text); |
31 | dump_tree(file.syntax()) | 30 | dump_tree(file.syntax()) |
32 | }) | 31 | }) |
diff --git a/crates/server/src/main_loop/mod.rs b/crates/server/src/main_loop/mod.rs index b66a24de1..58f6f88a7 100644 --- a/crates/server/src/main_loop/mod.rs +++ b/crates/server/src/main_loop/mod.rs | |||
@@ -126,7 +126,6 @@ fn main_loop_inner( | |||
126 | } | 126 | } |
127 | recv(libdata_receiver, data) => Event::Lib(data.unwrap()) | 127 | recv(libdata_receiver, data) => Event::Lib(data.unwrap()) |
128 | }; | 128 | }; |
129 | trace!("selected {:?}", event); | ||
130 | let mut state_changed = false; | 129 | let mut state_changed = false; |
131 | match event { | 130 | match event { |
132 | Event::Task(task) => on_task(task, msg_sender, pending_requests), | 131 | Event::Task(task) => on_task(task, msg_sender, pending_requests), |
@@ -163,6 +162,7 @@ fn main_loop_inner( | |||
163 | } | 162 | } |
164 | } | 163 | } |
165 | Event::Lib(lib) => { | 164 | Event::Lib(lib) => { |
165 | feedback(internal_mode, "library loaded", msg_sender); | ||
166 | state.add_lib(lib); | 166 | state.add_lib(lib); |
167 | } | 167 | } |
168 | Event::Msg(msg) => { | 168 | Event::Msg(msg) => { |
diff --git a/crates/server/tests/heavy_tests/main.rs b/crates/server/tests/heavy_tests/main.rs index d6e89bdf2..66620ac62 100644 --- a/crates/server/tests/heavy_tests/main.rs +++ b/crates/server/tests/heavy_tests/main.rs | |||
@@ -14,6 +14,7 @@ use m::req::{Runnables, RunnablesParams}; | |||
14 | 14 | ||
15 | use support::project; | 15 | use support::project; |
16 | 16 | ||
17 | |||
17 | const LOG: &'static str = ""; | 18 | const LOG: &'static str = ""; |
18 | 19 | ||
19 | #[test] | 20 | #[test] |
@@ -79,3 +80,20 @@ fn test_eggs() {} | |||
79 | ]"# | 80 | ]"# |
80 | ); | 81 | ); |
81 | } | 82 | } |
83 | |||
84 | // #[test] | ||
85 | // fn test_deps() { | ||
86 | // let server = project(r#" | ||
87 | // //- Cargo.toml | ||
88 | // [package] | ||
89 | // name = "foo" | ||
90 | // version = "0.0.0" | ||
91 | // [dependencies] | ||
92 | // regex = "=1.0.4" | ||
93 | |||
94 | // //- src/lib.rs | ||
95 | // extern crate regex; | ||
96 | // "#); | ||
97 | // server.wait_for_feedback("workspace loaded"); | ||
98 | // server.wait_for_feedback_n("library loaded", 1); | ||
99 | // } | ||
diff --git a/crates/server/tests/heavy_tests/support.rs b/crates/server/tests/heavy_tests/support.rs index 99a784e8d..731c2f51c 100644 --- a/crates/server/tests/heavy_tests/support.rs +++ b/crates/server/tests/heavy_tests/support.rs | |||
@@ -155,6 +155,9 @@ impl Server { | |||
155 | panic!("no response"); | 155 | panic!("no response"); |
156 | } | 156 | } |
157 | pub fn wait_for_feedback(&self, feedback: &str) { | 157 | pub fn wait_for_feedback(&self, feedback: &str) { |
158 | self.wait_for_feedback_n(feedback, 1) | ||
159 | } | ||
160 | pub fn wait_for_feedback_n(&self, feedback: &str, n: usize) { | ||
158 | let f = |msg: &RawMessage| match msg { | 161 | let f = |msg: &RawMessage| match msg { |
159 | RawMessage::Notification(n) if n.method == "internalFeedback" => { | 162 | RawMessage::Notification(n) if n.method == "internalFeedback" => { |
160 | return n.clone().cast::<req::InternalFeedback>() | 163 | return n.clone().cast::<req::InternalFeedback>() |
@@ -162,18 +165,18 @@ impl Server { | |||
162 | } | 165 | } |
163 | _ => false, | 166 | _ => false, |
164 | }; | 167 | }; |
165 | 168 | let mut total = 0; | |
166 | for msg in self.messages.borrow().iter() { | 169 | for msg in self.messages.borrow().iter() { |
167 | if f(msg) { | 170 | if f(msg) { |
168 | return; | 171 | total += 1 |
169 | } | 172 | } |
170 | } | 173 | } |
171 | while let Some(msg) = self.recv() { | 174 | while total < n { |
175 | let msg = self.recv().expect("no response"); | ||
172 | if f(&msg) { | 176 | if f(&msg) { |
173 | return; | 177 | total += 1; |
174 | } | 178 | } |
175 | } | 179 | } |
176 | panic!("no response") | ||
177 | } | 180 | } |
178 | fn recv(&self) -> Option<RawMessage> { | 181 | fn recv(&self) -> Option<RawMessage> { |
179 | let timeout = Duration::from_secs(5); | 182 | let timeout = Duration::from_secs(5); |