comment.go 503 B

12345678910111213141516171819202122232425
  1. package ace
  2. import "io"
  3. // comment represents a comment.
  4. type comment struct {
  5. elementBase
  6. }
  7. // Do nothing.
  8. func (e *comment) WriteTo(w io.Writer) (int64, error) {
  9. return 0, nil
  10. }
  11. // ContainPlainText returns true.
  12. func (e *comment) ContainPlainText() bool {
  13. return true
  14. }
  15. // newComment creates and returns a comment.
  16. func newComment(ln *line, rslt *result, src *source, parent element, opts *Options) *comment {
  17. return &comment{
  18. elementBase: newElementBase(ln, rslt, src, parent, opts),
  19. }
  20. }