| 444 | */ |
| 445 | |
| 446 | static int |
| 447 | yaml_parser_parse_document_content(yaml_parser_t *parser, yaml_event_t *event) |
| 448 | { |
| 449 | yaml_token_t *token; |
| 450 | |
| 451 | token = PEEK_TOKEN(parser); |
| 452 | if (!token) return 0; |
| 453 | |
| 454 | if (token->type == YAML_VERSION_DIRECTIVE_TOKEN || |
| 455 | token->type == YAML_TAG_DIRECTIVE_TOKEN || |
| 456 | token->type == YAML_DOCUMENT_START_TOKEN || |
| 457 | token->type == YAML_DOCUMENT_END_TOKEN || |
| 458 | token->type == YAML_STREAM_END_TOKEN) { |
| 459 | parser->state = POP(parser, parser->states); |
| 460 | return yaml_parser_process_empty_scalar(parser, event, |
| 461 | token->start_mark); |
| 462 | } |
| 463 | else { |
| 464 | return yaml_parser_parse_node(parser, event, 1, 0); |
| 465 | } |
| 466 | } |
| 467 | |
| 468 | /* |
| 469 | * Parse the productions: |
no test coverage detected