Expect DOCUMENT-END.
(emitter *yaml_emitter_t, event *yaml_event_t)
| 499 | |
| 500 | // Expect DOCUMENT-END. |
| 501 | func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { |
| 502 | if event.typ != yaml_DOCUMENT_END_EVENT { |
| 503 | return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") |
| 504 | } |
| 505 | // [Go] Force document foot separation. |
| 506 | emitter.foot_indent = 0 |
| 507 | if !yaml_emitter_process_foot_comment(emitter) { |
| 508 | return false |
| 509 | } |
| 510 | emitter.foot_indent = -1 |
| 511 | if !yaml_emitter_write_indent(emitter) { |
| 512 | return false |
| 513 | } |
| 514 | if !event.implicit { |
| 515 | // [Go] Allocate the slice elsewhere. |
| 516 | if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { |
| 517 | return false |
| 518 | } |
| 519 | if !yaml_emitter_write_indent(emitter) { |
| 520 | return false |
| 521 | } |
| 522 | } |
| 523 | if !yaml_emitter_flush(emitter) { |
| 524 | return false |
| 525 | } |
| 526 | emitter.state = yaml_EMIT_DOCUMENT_START_STATE |
| 527 | emitter.tag_directives = emitter.tag_directives[:0] |
| 528 | return true |
| 529 | } |
| 530 | |
| 531 | // Expect a flow item node. |
| 532 | func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { |
no test coverage detected