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

Function yaml_parser_parse

xs/tools/yaml/parser.c:191–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189 */
190
191YAML_DECLARE(int)
192yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event)
193{
194 assert(parser); /* Non-NULL parser object is expected. */
195 assert(event); /* Non-NULL event object is expected. */
196
197 /* Erase the event object. */
198
199 memset(event, 0, sizeof(yaml_event_t));
200
201 /* No events after the end of the stream or error. */
202
203 if (parser->stream_end_produced || parser->error ||
204 parser->state == YAML_PARSE_END_STATE) {
205 return 1;
206 }
207
208 /* Generate the next event. */
209
210 return yaml_parser_state_machine(parser, event);
211}
212
213/*
214 * Set parser error.

Callers 7

fxReadConfigurationFunction · 0.85
fxReadResultFunction · 0.85
yaml.hFile · 0.85
yaml_parser_loadFunction · 0.85
yaml_parser_load_mappingFunction · 0.85

Calls 2

assertFunction · 0.50

Tested by

no test coverage detected