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

Function yaml_parser_parse_node

external/libyaml/src/parser.c:535–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533 */
534
535static int
536yaml_parser_parse_node(yaml_parser_t *parser, yaml_event_t *event,
537 int block, int indentless_sequence)
538{
539 yaml_token_t *token;
540 yaml_char_t *anchor = NULL;
541 yaml_char_t *tag_handle = NULL;
542 yaml_char_t *tag_suffix = NULL;
543 yaml_char_t *tag = NULL;
544 yaml_mark_t start_mark, end_mark, tag_mark;
545 int implicit;
546
547 token = PEEK_TOKEN(parser);
548 if (!token) return 0;
549
550 if (token->type == YAML_ALIAS_TOKEN)
551 {
552 parser->state = POP(parser, parser->states);
553 ALIAS_EVENT_INIT(*event, token->data.alias.value,
554 token->start_mark, token->end_mark);
555 SKIP_TOKEN(parser);
556 return 1;
557 }
558
559 else
560 {
561 start_mark = end_mark = token->start_mark;
562
563 if (token->type == YAML_ANCHOR_TOKEN)
564 {
565 anchor = token->data.anchor.value;
566 start_mark = token->start_mark;
567 end_mark = token->end_mark;
568 SKIP_TOKEN(parser);
569 token = PEEK_TOKEN(parser);
570 if (!token) goto error;
571 if (token->type == YAML_TAG_TOKEN)
572 {
573 tag_handle = token->data.tag.handle;
574 tag_suffix = token->data.tag.suffix;
575 tag_mark = token->start_mark;
576 end_mark = token->end_mark;
577 SKIP_TOKEN(parser);
578 token = PEEK_TOKEN(parser);
579 if (!token) goto error;
580 }
581 }
582 else if (token->type == YAML_TAG_TOKEN)
583 {
584 tag_handle = token->data.tag.handle;
585 tag_suffix = token->data.tag.suffix;
586 start_mark = tag_mark = token->start_mark;
587 end_mark = token->end_mark;
588 SKIP_TOKEN(parser);
589 token = PEEK_TOKEN(parser);
590 if (!token) goto error;
591 if (token->type == YAML_ANCHOR_TOKEN)
592 {

Calls 2

yaml_freeFunction · 0.85

Tested by

no test coverage detected