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

feat!: Make any consume a full code point, not a single code unit #424

Merged
merged 4 commits into from
Mar 3, 2023

Conversation

pdubroy
Copy link
Contributor

@pdubroy pdubroy commented Mar 3, 2023

A JavaScript string is a sequence of 16-bit code units. Some Unicode characters, such as emoji, are encoded as pairs of 16-bit values. For example, the string '😆' has length 2, but contains a single Unicode code point. Previously, any always consumed a single 16-bit code unit. Now, it consumes the next code point, i.e. a full Unicode character.

BREAKING CHANGE: this changes the meaning of any in user grammars

@pdubroy pdubroy merged commit 79ea419 into main Mar 3, 2023
@pdubroy pdubroy deleted the any-code-point branch March 3, 2023 15:11
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.

1 participant