code: private void scanLitChar(int pos) {
          if (reader.ch == '\\') {
              if (reader.peekChar() == '\\' && !reader.isUnicode()) {
                  reader.skipChar();
                  reader.putChar('\\', true);
              } else {
                  reader.scanChar();
                  switch (reader.ch) {
                  case '0': case '1': case '2': case '3':
                  case '4': case '5': case '6': case '7':
                      char leadch = reader.ch;
                      int oct = reader.digit(pos, 8);
                      reader.scanChar();
                      if ('0' <= reader.ch && reader.ch <= '7') {
                          oct = oct * 8 + reader.digit(pos, 8);
                          reader.scanChar();
                          if (leadch <= '3' && '0' <= reader.ch && reader.ch <= '7') {
                              oct = oct * 8 + reader.digit(pos, 8);
                              reader.scanChar();
                          }
                      }
                      reader.putChar((char)oct);
                      break;
                  case 'b':
                      reader.putChar('\b', true); break;
                  case 't':
                      reader.putChar('\t', true); break;
                  case 'n':
                      reader.putChar('\n', true); break;
                  case 'f':
                      reader.putChar('\f', true); break;
                  case 'r':
                      reader.putChar('\r', true); break;
                  case '\'':
                      reader.putChar('\'', true); break;
                  case '\"':
                      reader.putChar('\"', true); break;
                  case '\\':
                      reader.putChar('\\', true); break;
                  default:
                      lexError(reader.bp, "illegal.esc.char");
                  }
              }
          } else if (reader.bp != reader.buflen) {
              reader.putChar(true);
          }
      }
docs: Read next character in character or string literal and copy into sbuf.