code: private void consume(final TokenType mType, final boolean mIgnoreWhitespace) {
  
          if (!is(mType, mIgnoreWhitespace)) {
              // error found by parser - stopping
              throw new IllegalStateException("Wrong token after " + mScanner.begin() + " at position "
                  + mScanner.getPos() + " found " + mToken.getType() + " expected " + mType + ".");
          }
      }
docs: Consumes a token. Tests if it really has the expected type and if not
  returns an error message. Otherwise gets a new token from the scanner. If
  that new token is of type whitespace and the ignoreWhitespace parameter
  is true, a new token is retrieved, until the current token is not of type
  whitespace.
  
  @param mType
  the specified token type
  @param mIgnoreWhitespace
  if true all new tokens with type whitespace are ignored and
  the next token is retrieved from the scanner