Skip to content

feat(fast_parser): enhance identifier handling with Unicode support #10226

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

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

GiveMe-A-Name
Copy link
Collaborator

Description:

  • Added support for Unicode characters in identifiers, allowing for a broader range of valid identifiers.
  • Introduced methods to handle Unicode escape sequences and UTF-8 characters in identifiers.
  • Updated the lexer to utilize these new methods, improving the parsing of identifiers that include non-ASCII characters.
  • Added tests to verify the correct handling of identifiers with Unicode characters and escape sequences.

BREAKING CHANGE:

Related issue (if exists):

- Added support for Unicode characters in identifiers, allowing for a broader range of valid identifiers.
- Introduced methods to handle Unicode escape sequences and UTF-8 characters in identifiers.
- Updated the lexer to utilize these new methods, improving the parsing of identifiers that include non-ASCII characters.
- Added tests to verify the correct handling of identifiers with Unicode characters and escape sequences.
@GiveMe-A-Name GiveMe-A-Name requested review from a team as code owners March 18, 2025 06:38
Copy link

changeset-bot bot commented Mar 18, 2025

⚠️ No Changeset found

Latest commit: c346947

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codspeed-hq bot commented Mar 18, 2025

CodSpeed Performance Report

Merging #10226 will degrade performances by 5.22%

Comparing GiveMe-A-Name:feat/parse-identifier-name (c346947) with main (540bdf8)

Summary

❌ 11 regressions
✅ 141 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
serialization of serde 2.8 µs 2.8 µs -1.05%
es/fast-lexer/angular 8.8 ms 9.2 ms -3.61%
es/fast-lexer/backbone 1.1 ms 1.2 ms -4.96%
es/fast-lexer/jquery 5.8 ms 6.1 ms -4.77%
es/fast-lexer/jquery mobile 9.6 ms 10 ms -4.55%
es/fast-lexer/mootools 4.6 ms 4.9 ms -5.11%
es/fast-lexer/three 28.3 ms 29.8 ms -5.22%
es/fast-lexer/underscore 905.1 µs 954.8 µs -5.2%
es/fast-lexer/yui 5.4 ms 5.6 ms -2.94%
es/lints/libs/d3 28 ms 28.3 ms -1.21%
es/lints/libs/terser 29.4 ms 29.8 ms -1.42%

@kdy1 kdy1 merged commit 482b63a into swc-project:main Mar 18, 2025
169 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.11.12 Mar 18, 2025
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants