     case .lineComment(let comment):
       try container.encode("LineComment", forKey: .kind)
       try container.encode(comment, forKey: .value)
+    case .garbageText(let text):
+      try container.encode("GarbageText", forKey: .kind)
+      try container.encode(text, forKey: .value)
     case .formfeeds(let count):
       try container.encode("Formfeed", forKey: .kind)
       try container.encode(count, forKey: .value)

    case let .lineComment(text),
         let .blockComment(text),
         let .docLineComment(text),
         let .docBlockComment(text):
      target.write(text)
    }
  }

  public static func docBlockComment(_ text: String) -> Trivia {
    return [.docBlockComment(text)]
  }

  /// Return a piece of trivia for any garbage text.
  public static func garbageText(_ text: String) -> Trivia {
    return [.garbageText(text)]
  }
}

/// Conformance for Trivia to the Collection protocol.
