public Token<V> match(final Type type) {
		if (LA(1) == type.code()) {
			final var token = LT(1);
			consume();
			return token;
		} else {
			throw new ParsingException(format(
				"Expecting %s but found %s.",
				type, LT(1)
			));
		}
	}
Try to <em>match</em> and consume the next token of the given
{@code type}. If the current token is not from the given type, a
{@link ParsingException} is thrown.

@param type the token type to match
@return the matched token
@throws NullPointerException if the given token {@code type} is
       {@code null}
@throws ParsingException if the current token doesn't match the desired
       token {@code type}
jenetics.ext/src/main/java/io/jenetics/ext/internal/parser/TokenParser.java