MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / yaml_parser_load_node

Function yaml_parser_load_node

xs/tools/yaml/loader.c:222–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 */
221
222static int
223yaml_parser_load_node(yaml_parser_t *parser, yaml_event_t *first_event)
224{
225 switch (first_event->type) {
226 case YAML_ALIAS_EVENT:
227 return yaml_parser_load_alias(parser, first_event);
228 case YAML_SCALAR_EVENT:
229 return yaml_parser_load_scalar(parser, first_event);
230 case YAML_SEQUENCE_START_EVENT:
231 return yaml_parser_load_sequence(parser, first_event);
232 case YAML_MAPPING_START_EVENT:
233 return yaml_parser_load_mapping(parser, first_event);
234 default:
235 assert(0); /* Could not happen. */
236 return 0;
237 }
238
239 return 0;
240}
241
242/*
243 * Add an anchor.

Callers 3

yaml_parser_load_mappingFunction · 0.85

Calls 5

yaml_parser_load_aliasFunction · 0.85
yaml_parser_load_scalarFunction · 0.85
yaml_parser_load_mappingFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected