Checks whether token is a string or primitive. */
| 381 | |
| 382 | /** Checks whether token is a string or primitive. */ |
| 383 | static void expect_scalar(jsmntok_t *tok) |
| 384 | { |
| 385 | if (!(tok->type == JSMN_STRING && !tok->size || |
| 386 | tok->type == JSMN_PRIMITIVE)) |
| 387 | error(tok, "string or primitive"); |
| 388 | } |
| 389 | |
| 390 | /** Skips all tokens that form the current token type. |
| 391 | Returns the token right after. |
no test coverage detected