MCPcopy Create free account
hub / github.com/apache/cloudberry / lex_expect

Function lex_expect

src/common/jsonapi.c:92–99  ·  view source on GitHub ↗

* lex_expect * * move the lexer to the next token if the current look_ahead token matches * the parameter token. Otherwise, report an error. */

Source from the content-addressed store, hash-verified

90 * the parameter token. Otherwise, report an error.
91 */
92static inline JsonParseErrorType
93lex_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) \

Callers 5

pg_parse_jsonFunction · 0.85
parse_object_fieldFunction · 0.85
parse_objectFunction · 0.85
parse_arrayFunction · 0.85

Calls 3

lex_peekFunction · 0.85
json_lexFunction · 0.85
report_parse_errorFunction · 0.85

Tested by

no test coverage detected