| 497 | } |
| 498 | |
| 499 | static const cbm_token_t *expect(parser_t *p, cbm_token_type_t type) { |
| 500 | if (check(p, type)) { |
| 501 | return advance(p); |
| 502 | } |
| 503 | snprintf(p->error, sizeof(p->error), "expected token type %d, got %d at pos %d", type, |
| 504 | peek(p)->type, peek(p)->pos); |
| 505 | return NULL; |
| 506 | } |
| 507 | |
| 508 | /* Free the first n entries of a property array and the array itself. */ |
| 509 | static void free_prop_entries(cbm_prop_filter_t *arr, int n) { |