| 332 | */ |
| 333 | |
| 334 | static int |
| 335 | yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event) |
| 336 | { |
| 337 | yaml_token_t *token; |
| 338 | |
| 339 | token = PEEK_TOKEN(parser); |
| 340 | if (!token) return 0; |
| 341 | |
| 342 | if (token->type != YAML_STREAM_START_TOKEN) { |
| 343 | return yaml_parser_set_parser_error(parser, |
| 344 | "did not find expected <stream-start>", token->start_mark); |
| 345 | } |
| 346 | |
| 347 | parser->state = YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE; |
| 348 | STREAM_START_EVENT_INIT(*event, token->data.stream_start.encoding, |
| 349 | token->start_mark, token->start_mark); |
| 350 | SKIP_TOKEN(parser); |
| 351 | |
| 352 | return 1; |
| 353 | } |
| 354 | |
| 355 | /* |
| 356 | * Parse the productions: |
no test coverage detected