| 388 | } |
| 389 | |
| 390 | void hc_read_id(const char **in, |
| 391 | struct hc_list *out, |
| 392 | struct hc_sloc *sloc) { |
| 393 | struct hc_sloc floc = *sloc; |
| 394 | struct hc_memory_stream buf; |
| 395 | hc_memory_stream_init(&buf, &hc_malloc_default); |
| 396 | hc_defer(hc_stream_deinit(&buf.stream)); |
| 397 | char c = 0; |
| 398 | |
| 399 | while ((c = **in)) { |
| 400 | if (isspace(c) || c == '(' || c == ')') { |
| 401 | break; |
| 402 | } |
| 403 | |
| 404 | hc_putc(&buf.stream, c); |
| 405 | sloc->col++; |
| 406 | (*in)++; |
| 407 | } |
| 408 | |
| 409 | struct hc_id *f = malloc(sizeof(struct hc_id)); |
| 410 | hc_id_init(f, floc, out, hc_memory_stream_string(&buf)); |
| 411 | } |
| 412 | |
| 413 | bool hc_read_next(const char **in, |
| 414 | struct hc_list *out, |
no test coverage detected