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

Named captures to return their names in-order #97

Merged
merged 4 commits into from
Sep 2, 2024
Merged

Conversation

ridiculousfish
Copy link
Owner

Prior to this commit, the Match::named_groups() function would return names in an arbitrary order, because they were stored in a hash table. Switch to returning them in the original specification order from the pattern. This allows implementing the JS engine semantics where the object key order matches that from the pattern.

Fixes #96

Prior to this commit, the Match::named_groups() function would return
names in an arbitrary order, because they were stored in a hash table.
Switch to returning them in the original specification order from the
pattern. This allows implementing the JS engine semantics where the
object key order matches that from the pattern.

Fixes #96
@ridiculousfish ridiculousfish merged commit f4cdee5 into master Sep 2, 2024
7 checks passed
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.

Stable ordering of named_group_indices
1 participant