MCPcopy Index your code
hub / github.com/IBM/Project_CodeNet / jsonml_attributes

Function jsonml_attributes

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

Helper for jsonml_parse. */

Source from the content-addressed store, hash-verified

614
615/* Helper for jsonml_parse. */
616static jsmntok_t *jsonml_attributes(jsmntok_t *token, Node node)
617{
618 int keys = token->size;
619 token++;
620 while (keys--) {
621 /* key: scalar (string, number, bool, null) */
622 expect(token, JSMN_STRING);
623 token++;
624 expect_scalar(token);
625 node_add_attr(node, attr_create(token-1, token));
626 token++;
627 }
628 return token;
629}
630
631/* Helper for jsonml_parse. */
632static Node jsonml_element(jsmntok_t **tok, Graph g)

Callers 1

jsonml_elementFunction · 0.85

Calls 4

expectFunction · 0.85
expect_scalarFunction · 0.85
node_add_attrFunction · 0.85
attr_createFunction · 0.85

Tested by

no test coverage detected