Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upInvalid assertion for UTF16Encoding with template unicode escapes #911
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
isiahmeadows
commented
May 5, 2017
•
|
Note: this bug exists independent of the template literal revision. |
isiahmeadows
closed this
May 5, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
isiahmeadows
May 5, 2017
Actually, the template literal revision fixes this, due to it using CodePoint and NotCodePoint to restrict interpretation.
isiahmeadows
commented
May 5, 2017
|
Actually, the template literal revision fixes this, due to it using CodePoint and NotCodePoint to restrict interpretation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
isiahmeadows commentedMay 5, 2017
Something I found while implementing templates for a new parser.
The string is statically determined to be invalid, but the template version is not, due to the most recent changes to the grammar (relaxing the template literal restriction). In 11.8.6.1, it states the following:
In 11.8.4.3, it states the following:
In 10.1.1,
UTF16Encodingmakes the following assertion:This is invalid for templates when parsing the escape
\u{FFFFFFFF}, which is perfectly valid within template literals.Here's how I feel it might be best resolved: change
UTF16Encodingto do the following initially: