Skip to content

<regex>: Avoid generating empty groups when parsing empty alternatives#6249

Merged
StephanTLavavej merged 2 commits intomicrosoft:mainfrom
muellerj2:regex-avoid-empty-groups-in-empty-alternatives
Apr 17, 2026
Merged

<regex>: Avoid generating empty groups when parsing empty alternatives#6249
StephanTLavavej merged 2 commits intomicrosoft:mainfrom
muellerj2:regex-avoid-empty-groups-in-empty-alternatives

Conversation

@muellerj2
Copy link
Copy Markdown
Contributor

Towards #5962.

This makes the parser no longer add superfluous empty groups when parsing empty alternatives. Instead, the _N_if node gets connected directly to the _N_endif node now.

@muellerj2 muellerj2 requested a review from a team as a code owner April 11, 2026 20:46
@github-project-automation github-project-automation Bot moved this to Initial Review in STL Code Reviews Apr 11, 2026
@StephanTLavavej StephanTLavavej added performance Must go faster regex meow is a substring of homeowner labels Apr 12, 2026
@StephanTLavavej StephanTLavavej self-assigned this Apr 12, 2026
@StephanTLavavej StephanTLavavej removed their assignment Apr 13, 2026
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 13, 2026
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 15, 2026
@StephanTLavavej
Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo. Please notify me if any further changes are pushed, otherwise no action is required.

@StephanTLavavej StephanTLavavej merged commit 0668d8e into microsoft:main Apr 17, 2026
49 checks passed
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews Apr 17, 2026
@StephanTLavavej
Copy link
Copy Markdown
Member

🪹 🪫 🔅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Must go faster regex meow is a substring of homeowner

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants