private static int parseEscapedSymbol(boolean isAfterEscapedBackslash, @NotNull String chars, int index,
                                        boolean textBlock,
                                        @NotNull StringBuilder out) {
    if (index == chars.length()) return -1;
    char c = chars.charAt(index++);
    if (parseEscapedChar(c, textBlock, out)) {
      return index;
    }
    switch (c) {
      case '\\':
        boolean isUnicodeSequenceStart = isAfterEscapedBackslash && index < chars.length() && chars.charAt(index) == 'u';
        if (isUnicodeSequenceStart) {
          index = parseUnicodeEscape(true, chars, index, textBlock, out);
        }
        else {
          out.append('\\');
        }
        break;

      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
        index = parseOctalEscape(c, chars, index, out);
        break;

      case 'u':
        if (isAfterEscapedBackslash) return -1;
        index = parseUnicodeEscape(false, chars, index - 1, textBlock, out);
        break;

      default:
        return -1;
    }
    return index;
  }
private static int parseEscapedSymbol(boolean isAfterEscapedBackslash, @NotNull String chars, int index,
                                        boolean textBlock,
                                        @NotNull StringBuilder out)