code: public void peekExpect(final char expectedChar) throws ParseException {
          if (position == string.length()) {
              throw new ParseException(this, "Expected '" + expectedChar + "'; reached end of string");
          }
          final char next = string.charAt(position);
          if (next != expectedChar) {
              throw new ParseException(this, "Expected '" + expectedChar + "'; got '" + next + "'");
          }
      }
docs: Get the next character, throwing a {@link ParseException} if the next character is not the expected
  character.
  
  @param expectedChar
  The expected next character.
  @throws ParseException
  If the next character is not the expected next character.