public boolean match(ParserTokenType expected) {
      ParserToken next = lookAhead(0);
      if (next == null || !next.type.isInstance(expected)) {
         return false;
      }
      consume();
      return true;
   }
public boolean match ( ParserTokenType expected ) { ParserToken next = lookAhead ( 0 ) ; if ( next == null || ! next . type . isInstance ( expected ) ) { return false ; } consume ( ) ; return true ; }
Determines if the next token in the stream is of an expected type and consumes it if it is

@param expected The expected type
@return True if the next token is of the expected type, false otherwise