Skip to content

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Oct 29, 2025

Fixes #6358

Copilot AI review requested due to automatic review settings October 29, 2025 01:33
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Oct 29, 2025
Copy link
Member Author

leaysgur commented Oct 29, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the duplicate named capturing group detection in regular expression parsing. The changes replace a complex post-processing approach with a cleaner, more maintainable algorithm that tracks alternative paths during parsing.

  • Introduced AlternativeTracker to track nesting depth and alternative branches in real-time
  • Replaced SimpleUnit enum and deferred duplicate checking with immediate validation during parsing
  • Added NamedGroupInfo struct to store named group metadata including alternative paths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 29, 2025

CodSpeed Performance Report

Merging #15045 will not alter performance

Comparing 10-28-refactor_regular_expression_improve_initizalizing_state (1b59a0c) with main (b27c5b9)

Summary

✅ 37 untouched

@leaysgur leaysgur force-pushed the 10-28-refactor_regular_expression_improve_initizalizing_state branch from 3ba3eb4 to 1b59a0c Compare October 29, 2025 01:43
@leaysgur leaysgur requested a review from Boshen October 29, 2025 01:51
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Oct 29, 2025
Copy link
Member

Boshen commented Oct 29, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 10-28-refactor_regular_expression_improve_initizalizing_state branch from 1b59a0c to 561b743 Compare October 29, 2025 04:12
@graphite-app graphite-app bot merged commit 561b743 into main Oct 29, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 10-28-refactor_regular_expression_improve_initizalizing_state branch October 29, 2025 04:17
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regular_expression: Improve ES2025 proposal-duplicate-named-capturing-groups logic

3 participants