docs: TokenRange recover(int recoveryTokenType, ParseException p) {
          JavaToken begin = null;
          if (p.currentToken != null) {
              begin = token();
          }
          Token t;
          do {
              t = getNextToken();
          } while (t.kind != recoveryTokenType && t.kind != EOF);
  
          JavaToken end = token();
  
          TokenRange tokenRange = null;
          if (begin != null && end != null) {
              tokenRange = range(begin, end);
          }
  
          problems.add(new Problem(makeMessageForParseException(p), tokenRange, p));
          return tokenRange;
      }