-
Notifications
You must be signed in to change notification settings - Fork 2k
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
RFC: Support full Unicode in lexer #3117
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leebyron
force-pushed
the
unicode-lexer
branch
3 times, most recently
from
May 19, 2021 22:57
4331b64
to
601b4c2
Compare
andimarek
reviewed
May 20, 2021
leebyron
force-pushed
the
unicode-lexer
branch
2 times, most recently
from
May 21, 2021 22:17
22b5929
to
7b7a338
Compare
andimarek
reviewed
May 23, 2021
leebyron
added
PR: feature 🚀
requires increase of "minor" version number
spec RFC
Implementation of a proposed change to the GraphQL specification
labels
May 27, 2021
leebyron
force-pushed
the
unicode-lexer
branch
2 times, most recently
from
June 3, 2021 16:56
39d12f3
to
231c9d7
Compare
leebyron
force-pushed
the
unicode-lexer
branch
2 times, most recently
from
June 3, 2021 20:19
9cdbb19
to
497a23e
Compare
Depends on #3115 Implements RFC at graphql/graphql-spec#849. * Replaces `isSourceCharacter` with `isUnicodeScalarValue` * Adds `isSupplementaryCodePoint`, used in String, BlockStrings, and Comments to ensure correct lexing of JavaScript's UTF-16 source. * Updates `printCodePointAt` to correctly print supplementary code points. * Adds variable-width Unicode escape sequences * Adds explicit support for legacy JSON-style fixed-width Unicode escape sequence surrogate pairs. * Adds `printString` to no longer rely on `JSON.stringify`. Borrows some implementation details from Node.js internals for string printing. Implements: > When producing a {StringValue}, implementations should use escape sequences to > represent non-printable control characters (U+0000 to U+001F and U+007F to > U+009F). Other escape sequences are not necessary, however an implementation may > use escape sequences to represent any other range of code points. Closes #2449 Co-authored-by: Andreas Marek <andimarek@fastmail.fm>
IvanGoncharov
approved these changes
Jul 1, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leebyron Looks good!
Feel free to merge if it approved on today WG.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
PR: feature 🚀
requires increase of "minor" version number
spec RFC
Implementation of a proposed change to the GraphQL specification
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #3115
Implements RFC at graphql/graphql-spec#849.
Replaces
isSourceCharacter
withisUnicodeScalarValue
Adds
isSupplementaryCodePoint
, used in String, BlockStrings, and Comments to ensure correct lexing of JavaScript's UTF-16 source.Updates
printCodePointAt
to correctly print supplementary code points.Adds variable-width Unicode escape sequences
Adds explicit support for legacy JSON-style fixed-width Unicode escape sequence surrogate pairs.
Adds
printString
to no longer rely onJSON.stringify
. Borrows some implementation details from Node.js internals for string printing.Implements:
Closes #2449
Co-authored-by: Andreas Marek andimarek@fastmail.fm