| 348 | } |
| 349 | |
| 350 | static void error(jsmntok_t *tok, const char *msg) |
| 351 | { |
| 352 | fprintf(stderr, "(E): [pos:%u] Expect %s; got %s (", |
| 353 | tok->start, msg, type(tok->type)); |
| 354 | show_16(stderr, tok); |
| 355 | fputs(").\n", stderr); |
| 356 | exit(6); |
| 357 | } |
| 358 | |
| 359 | /** Checks whether token is of a certain type. */ |
| 360 | static void expect(jsmntok_t *tok, jsmntype_t t) |
no test coverage detected