@SuppressWarnings("AssignmentToForLoopParameter")
  private static Pair<String, Integer> unescape(String value, int offset) {
    StringBuilder b = new StringBuilder(value);
    int[] offsets = new int[]{offset};
    boolean escaped = false;
    for (int i = 0; i < b.length(); i++) {
      char c = b.charAt(i);
      if (c == '\\') {
        if (escaped) {
          escaped = false;
          i = replaceEscapePair(b, i, "\\", offsets);
        }
        else {
          escaped = true;
        }
      }
      else if (escaped) {
        escaped = false;
        String replacement = switch (c) {
          case '\n' -> "";
          case 'r' -> "\n";
          case 'n' -> "\r";
          case 'u', 'U' -> null;
          default -> Character.toString(c);
        };
        if (replacement != null) {
          i = replaceEscapePair(b, i, replacement, offsets);
        }
      }
    }
    String result = Strings.convertLineSeparators(b.toString(), "\n", offsets);
    return Pair.create(result, offsets[0]);
  }
@SuppressWarnings("AssignmentToForLoopParameter")
  private static Pair<String, Integer> unescape(String value, int offset)