code: public static Parser<Void> isChar(final CharPredicate predicate) {
      return new Parser<Void>() {
        final String name = predicate.toString();
  
        @Override boolean apply(ParseContext ctxt) {
          if (ctxt.isEof()) {
            ctxt.missing(name);
            return false;
          }
          char c = ctxt.peekChar();
          if (predicate.isChar(c)) {
            ctxt.next();
            ctxt.result = null;
            return true;
          }
          ctxt.missing(name);
          return false;
        }
  
        @Override public String toString() {
          return name;
        }
      };
    }
docs: A scanner that succeeds and consumes the current character if it satisfies the given
  {@link CharPredicate}.
  
  @param predicate the predicate.
  @return the scanner.