Closed Boshen closed 8 months ago
For detecting JavaScript identifiers, oxc has an optimized routine which this crate could use. I can add the code to unicode-id-start
if we want more performance :-) https://github.com/oxc-project/oxc/blob/27052ebfed27d8aa97913d26f95d285d9cb58e51/crates/oxc_syntax/src/identifier.rs#L66-L137
lgtm
Though I believe this whole module, and sourceview
which is the only other module that uses this might be headed out the door once we get around to #71
Fixed the clippy warning, ready to merge, and possibly a release 😁
We've gone full circle :sweat_smile:
The
unicode-id
andunicode-id-start
crates were cloned fromunicode-xid
andunicode-ident
for usages in the oxc project.Oxc will be using this crate for sourcemap support, and is currently using the better optimized
unicode-id-start
crate. I don't want to include two similar dependencies due to the rather large static storage size of these crates.The
unicode-id-start
crate is also faster and uses slightly less static storage. See full details at https://github.com/oxc-project/unicode-id-start/tree/master?tab=readme-ov-file#comparison-of-performanceThe version "1" is used instead of the latest version because the crate is stable, future versions will only include unicode version upgrades.
And thank you Sentry for the sponsorship due to the inclusion of
unicode-id
crate ❤️