Skip to content

Reject %empty misuse in later rule alternatives - #821

Merged
ydah merged 1 commit into
masterfrom
fix/empty-rule-alternatives
Oct 23, 2026
Merged

ydah merged 1 commit into
masterfrom
fix/empty-rule-alternatives

Conversation

@ydah

@ydah ydah commented Oct 21, 2026

Copy link
Copy Markdown
Member

%empty misuse was checked only in the first rule alternative. B %empty | A raised an error, while A | B %empty was silently accepted.

Validate each alternative when building rule nodes. Add regression coverage for symbols before and after %empty, repeated %empty, and misuse in the second and third alternatives, including diagnostic locations.

@ydah
ydah merged commit dc84fcd into master Oct 23, 2026
45 checks passed
@ydah
ydah deleted the fix/empty-rule-alternatives branch October 23, 2026 11:59
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.

1 participant