code: func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool {
  	emitter.events = append(emitter.events, *event)
  	for !yaml_emitter_need_more_events(emitter) {
  		event := &emitter.events[emitter.events_head]
  		if !yaml_emitter_analyze_event(emitter, event) {
  			return false
  		}
  		if !yaml_emitter_state_machine(emitter, event) {
  			return false
  		}
  		yaml_event_delete(event)
  		emitter.events_head++
  	}
  	return true
  }
docs: // Emit an event.