// readCommentNode reads a raw node.
505654
func (mr *mlReader) readCommentNode() error {
	var buf bytes.Buffer
	for {
		r, rc, err := mr.readRune()
		switch {
		case err != nil:
			return err
		case rc == rcEOF:
			return errors.New(ErrReader, errorMessages, "unexpected end of file while reading a comment node")
		case rc == rcHash:
			r, rc, err = mr.readRune()
			switch {
			case err != nil:
				return err
			case rc == rcEOF:
				return errors.New(ErrReader, errorMessages, "unexpected end of file while reading a comment node")
			case rc == rcClose:
				return mr.builder.CommentNode(buf.String())
			}
			buf.WriteRune(chHash)
			buf.WriteRune(r)
		default:
			buf.WriteRune(r)
		}
	}
}
225676
func (cec *ChannelEngineConn) ReadStatement() (string, error) {
	message, ok := <-cec.conn
	if !ok {
		cec.conn = nil
		return "", io.EOF
	}

	return message.Value[0], nil
}
414344
func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig {
	s.Comment = &v
	return s
}
644477
func (s *Deployment) SetComment(v string) *Deployment {
	s.Comment = &v
	return s
}
1280133
func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary {
	s.Comment = &v
	return s
}
920942
func (c *Comments) PostProcessNode(node Node) {
	c.applyComments(node, nil, TRAILING)
}
685140
func (p *PullRequest) GetComments() int {
	if p == nil || p.Comments == nil {
		return 0
	}
	return *p.Comments
}
249904
func (s *FieldLevelEncryptionSummary) SetComment(v string) *FieldLevelEncryptionSummary {
	s.Comment = &v
	return s
}
537667
func (cm CommentMap) MoveComments(from, to Node, position CommentPosition) {
	for i, c := range cm[from] {
		if c.Position == position {
			cm.AddComment(to, c)

			// Remove the comment from the "from" slice
			cm[from][i] = cm[from][len(cm[from])-1]
			cm[from][len(cm[from])-1] = nil
			cm[from] = cm[from][:len(cm[from])-1]
		}
	}
}
1143241
func (s *PublicKeySummary) SetComment(v string) *PublicKeySummary {
	s.Comment = &v
	return s
}
413500
func (c *Comments) applyComments(node, previous Node, position CommentPosition) {
	if previous != nil {
		c.CommentMap.AddComments(previous, c.Comments, position)
		c.Comments = nil
	} else {
		c.CommentMap.AddComments(node, c.Comments, position)
		c.Comments = nil
	}
	// Only apply the future comments to the node if the previous is set.
	// This is for detecting end of line comments and which node comments on the following lines belongs to
	if previous != nil {
		c.CommentMap.AddComments(node, c.future, position)
		c.future = nil
	}
}
266031
func (v *printVisitor) VisitComment(node *CommentStatement) interface{} {
	v.line("{{! '" + node.Value + "' }}")

	return nil
}
1352611
func parseComment(t *thing) (*Comment, error) {
	// Reddit makes the replies field a string if it is empty, just to make
	// it harder for programmers who like static type systems.
	value, present := t.Data["replies"]
	if present {
		if str, ok := value.(string); ok && str == "" {
			delete(t.Data, "replies")
		}
	}

	c := &comment{}
	if err := mapstructure.Decode(t.Data, c); err != nil {
		return nil, mapDecodeError(err, t.Data)
	}

	var err error
	if c.Replies.Kind == listingKind {
		c.Comment.Replies, _, _, err = parseListing(&c.Replies)
	}

	c.Comment.Deleted = c.Comment.Body == deletedKey
	return &c.Comment, err
}
1306552
func (cm CommentMap) AddComment(node Node, comment *Comment) {
	list := cm[node]
	list = append(list, comment)

	cm[node] = list
}
430624
func (c *jiraClientImpl) PostComment(issueID string, commentToPost string) error {
	_, _, err := c.Client.Issue.AddComment(issueID, &jira.Comment{Body: commentToPost})
	return err
}
1351844
func (o *GetTaskCommentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetTaskCommentsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil

	default:
		result := NewGetTaskCommentsDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		if response.Code()/100 == 2 {
			return result, nil
		}
		return nil, result
	}
}
278280
func (c *Commit) GetCommentCount() int {
	if c == nil || c.CommentCount == nil {
		return 0
	}
	return *c.CommentCount
}