MCPcopy
hub / github.com/go-yaml/yaml / yaml_emitter_emit_sequence_start

Function yaml_emitter_emit_sequence_start

emitterc.go:913–927  ·  view source on GitHub ↗

Expect SEQUENCE-START.

(emitter *yaml_emitter_t, event *yaml_event_t)

Source from the content-addressed store, hash-verified

911
912// Expect SEQUENCE-START.
913func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool {
914 if !yaml_emitter_process_anchor(emitter) {
915 return false
916 }
917 if !yaml_emitter_process_tag(emitter) {
918 return false
919 }
920 if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE ||
921 yaml_emitter_check_empty_sequence(emitter) {
922 emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE
923 } else {
924 emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE
925 }
926 return true
927}
928
929// Expect MAPPING-START.
930func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool {

Callers 1

yaml_emitter_emit_nodeFunction · 0.85

Calls 4

yaml_emitter_process_tagFunction · 0.85
sequence_styleMethod · 0.80

Tested by

no test coverage detected