| 548 | */ |
| 549 | |
| 550 | static int |
| 551 | yaml_parser_parse_node(yaml_parser_t *parser, yaml_event_t *event, |
| 552 | int block, int indentless_sequence) |
| 553 | { |
| 554 | yaml_token_t *token; |
| 555 | yaml_char_t *anchor = NULL; |
| 556 | yaml_char_t *tag_handle = NULL; |
| 557 | yaml_char_t *tag_suffix = NULL; |
| 558 | yaml_char_t *tag = NULL; |
| 559 | yaml_mark_t start_mark, end_mark, tag_mark; |
| 560 | int implicit; |
| 561 | |
| 562 | token = PEEK_TOKEN(parser); |
| 563 | if (!token) return 0; |
| 564 | |
| 565 | if (token->type == YAML_ALIAS_TOKEN) |
| 566 | { |
| 567 | parser->state = POP(parser, parser->states); |
| 568 | ALIAS_EVENT_INIT(*event, token->data.alias.value, |
| 569 | token->start_mark, token->end_mark); |
| 570 | SKIP_TOKEN(parser); |
| 571 | return 1; |
| 572 | } |
| 573 | |
| 574 | else |
| 575 | { |
| 576 | start_mark = end_mark = token->start_mark; |
| 577 | |
| 578 | if (token->type == YAML_ANCHOR_TOKEN) |
| 579 | { |
| 580 | anchor = token->data.anchor.value; |
| 581 | start_mark = token->start_mark; |
| 582 | end_mark = token->end_mark; |
| 583 | SKIP_TOKEN(parser); |
| 584 | token = PEEK_TOKEN(parser); |
| 585 | if (!token) goto error; |
| 586 | if (token->type == YAML_TAG_TOKEN) |
| 587 | { |
| 588 | tag_handle = token->data.tag.handle; |
| 589 | tag_suffix = token->data.tag.suffix; |
| 590 | tag_mark = token->start_mark; |
| 591 | end_mark = token->end_mark; |
| 592 | SKIP_TOKEN(parser); |
| 593 | token = PEEK_TOKEN(parser); |
| 594 | if (!token) goto error; |
| 595 | } |
| 596 | } |
| 597 | else if (token->type == YAML_TAG_TOKEN) |
| 598 | { |
| 599 | tag_handle = token->data.tag.handle; |
| 600 | tag_suffix = token->data.tag.suffix; |
| 601 | start_mark = tag_mark = token->start_mark; |
| 602 | end_mark = token->end_mark; |
| 603 | SKIP_TOKEN(parser); |
| 604 | token = PEEK_TOKEN(parser); |
| 605 | if (!token) goto error; |
| 606 | if (token->type == YAML_ANCHOR_TOKEN) |
| 607 | { |
no test coverage detected