MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / yaml_parser_parse_stream_start

Function yaml_parser_parse_stream_start

external/libyaml/src/parser.c:319–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 */
318
319static int
320yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event)
321{
322 yaml_token_t *token;
323
324 token = PEEK_TOKEN(parser);
325 if (!token) return 0;
326
327 if (token->type != YAML_STREAM_START_TOKEN) {
328 return yaml_parser_set_parser_error(parser,
329 "did not find expected <stream-start>", token->start_mark);
330 }
331
332 parser->state = YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE;
333 STREAM_START_EVENT_INIT(*event, token->data.stream_start.encoding,
334 token->start_mark, token->start_mark);
335 SKIP_TOKEN(parser);
336
337 return 1;
338}
339
340/*
341 * Parse the productions:

Callers 1

Calls 1

Tested by

no test coverage detected