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

Function expectToken

src/e9patch/e9json.cpp:393–402  ·  view source on GitHub ↗

* Expect `token'. */

Source from the content-addressed store, hash-verified

391 * Expect `token'.
392 */
393static void expectToken(Parser &parser, char token)
394{
395 char got = getToken(parser);
396 if (got == token)
397 return;
398 if (parser.isPipe() && token == EOF)
399 exit(EXIT_FAILURE);
400 parse_error(parser, "failed to parse JSON message; expected token `%s', "
401 "got token `%s'", getTokenName(token), getTokenName(got));
402}
403
404/*
405 * Expect `token1' or `token2'.

Callers 8

expectStringFunction · 0.85
parseAndDiscardObjectFunction · 0.85
makeDataEntryFunction · 0.85
parseBytesFunction · 0.85
parseMetadataFunction · 0.85
parseStringsFunction · 0.85
parseParamsFunction · 0.85
getMessageFunction · 0.85

Calls 4

getTokenFunction · 0.85
exitFunction · 0.85
getTokenNameFunction · 0.85
isPipeMethod · 0.80

Tested by

no test coverage detected