* lex_expect * * move the lexer to the next token if the current look_ahead token matches * the parameter token. Otherwise, report an error. */
| 90 | * the parameter token. Otherwise, report an error. |
| 91 | */ |
| 92 | static inline JsonParseErrorType |
| 93 | lex_expect(JsonParseContext ctx, JsonLexContext *lex, JsonTokenType token) |
| 94 | { |
| 95 | if (lex_peek(lex) == token) |
| 96 | return json_lex(lex); |
| 97 | else |
| 98 | return report_parse_error(ctx, lex); |
| 99 | } |
| 100 | |
| 101 | /* chars to consider as part of an alphanumeric token */ |
| 102 | #define JSON_ALPHANUMERIC_CHAR(c) \ |
no test coverage detected