CfParser.expect

Token expect(TokenType type) @safe pure

Consumes the current token if it matches the expected type.

Parameters

typeThe expected token type

Returns

The consumed token.

Throws

CfParseException if the current token does not match.