code: func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool {
  
  	emitter.anchor_data.anchor = nil
  	emitter.tag_data.handle = nil
  	emitter.tag_data.suffix = nil
  	emitter.scalar_data.value = nil
  
  	switch event.typ {
  	case yaml_ALIAS_EVENT:
  		if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) {
  			return false
  		}
  
  	case yaml_SCALAR_EVENT:
  		if len(event.anchor) > 0 {
  			if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) {
  				return false
  			}
  		}
  		if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) {
  			if !yaml_emitter_analyze_tag(emitter, event.tag) {
  				return false
  			}
  		}
  		if !yaml_emitter_analyze_scalar(emitter, event.value) {
  			return false
  		}
  
  	case yaml_SEQUENCE_START_EVENT:
  		if len(event.anchor) > 0 {
  			if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) {
  				return false
  			}
  		}
  		if len(event.tag) > 0 && (emitter.canonical || !event.implicit) {
  			if !yaml_emitter_analyze_tag(emitter, event.tag) {
  				return false
  			}
  		}
  
  	case yaml_MAPPING_START_EVENT:
  		if len(event.anchor) > 0 {
  			if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) {
  				return false
  			}
  		}
  		if len(event.tag) > 0 && (emitter.canonical || !event.implicit) {
  			if !yaml_emitter_analyze_tag(emitter, event.tag) {
  				return false
  			}
  		}
  	}
  	return true
  }
docs: // Check if the event data is valid.