boolean (final PrattBuilder builder, final boolean consume, final PrattTokenType... types) { final TokenSet set = TokenSet.create(types); if (!set.contains(builder.getTokenType())) { builder.assertToken(types[0]); while (!set.contains(builder.getTokenType()) && !builder.isEof()) { builder.advance(); } } if (consume) { builder.advance(); } return !builder.isEof(); }