     case "Newline":
       let value = try container.decode(Int.self, forKey: .value)
       self = .newlines(value)
+    case "CarriageReturn":
+      let value = try container.decode(Int.self, forKey: .value)
+      self = .carriageReturns(value)
     case "Backtick":
       let value = try container.decode(Int.self, forKey: .value)
       self = .backticks(value)

      var total = 0
      for char in text.utf8 {
        total += 1
        if char == 10 /* ASCII newline */ {
          col = 0
          lines += 1
        } else {

    case .newlines(let count):
      try container.encode("Newline", forKey: .kind)
      try container.encode(count, forKey: .value)
    case .carriageReturns(let count):
      try container.encode("CarriageReturn", forKey: .kind)
      try container.encode(count, forKey: .value)
    case .spaces(let count):
      try container.encode("Space", forKey: .kind)
      try container.encode(count, forKey: .value)
