MCPcopy Index your code
hub / github.com/GJDuck/e9patch / expectString

Function expectString

src/e9patch/e9json.cpp:446–452  ·  view source on GitHub ↗

* Expect the specific string token. */

Source from the content-addressed store, hash-verified

444 * Expect the specific string token.
445 */
446static NO_INLINE void expectString(Parser &parser, const char *str)
447{
448 expectToken(parser, TOKEN_STRING);
449 if (strcmp(parser.s, str) != 0)
450 parse_error(parser, "failed to parse JSON message; expected string "
451 "\"%s\", got \"%s\"", str, parser.s);
452}
453
454/*
455 * Parses and discards a JSON object.

Callers 1

getMessageFunction · 0.85

Calls 2

expectTokenFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected