MCPcopy Create free account
hub / github.com/IBM/Project_CodeNet / expect_scalar

Function expect_scalar

tools/json-graph/src/jgflib.c:383–388  ·  view source on GitHub ↗

Checks whether token is a string or primitive. */

Source from the content-addressed store, hash-verified

381
382/** Checks whether token is a string or primitive. */
383static 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.

Callers 2

jsonml_attributesFunction · 0.85
jsonml_elementFunction · 0.85

Calls 1

errorFunction · 0.85

Tested by

no test coverage detected