Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pattern): Handle empty alternatives #4283

Merged
merged 13 commits into from
Nov 25, 2024
Merged

Conversation

loewenheim
Copy link
Contributor

@loewenheim loewenheim commented Nov 22, 2024

This introduces a new Optional variant of Token that optionally matches the contained list of tokens. These optional tokens are parsed from alternations containing empty branches, e.g. {foo,bar,} (note the trailing comma).

@loewenheim loewenheim self-assigned this Nov 22, 2024
@loewenheim loewenheim force-pushed the feat/pattern-optional branch from e3ccb70 to 43b8415 Compare November 22, 2024 13:45
@loewenheim loewenheim force-pushed the feat/pattern-optional branch from 651db10 to 6d4eec6 Compare November 22, 2024 13:51
@loewenheim loewenheim marked this pull request as ready for review November 25, 2024 08:43
@loewenheim loewenheim requested a review from a team as a code owner November 25, 2024 08:43
@loewenheim loewenheim requested a review from Dav1dde November 25, 2024 08:46
@loewenheim loewenheim changed the title WIP(pattern): Introduce optional token type relay-pattern: Handle empty alternatives Nov 25, 2024
@loewenheim loewenheim changed the title relay-pattern: Handle empty alternatives feat(pattern): Handle empty alternatives Nov 25, 2024
relay-pattern/src/lib.rs Outdated Show resolved Hide resolved
relay-pattern/src/lib.rs Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@loewenheim loewenheim merged commit 7b252a7 into master Nov 25, 2024
23 checks passed
@loewenheim loewenheim deleted the feat/pattern-optional branch November 25, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants