Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for extended Unicode escape sequences in strings and templates#2169

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@DanielRosenwasser
Copy link
Member

Fixes#2047.

ES6 extended escapes take the form of\u{XXXXX...} whereXXXXX... is any number of hex digits.It is a syntax error if the value of these digits is greater than 0x10FFFF. When interpreting the value of such a code point, it must be interpreted as two individual UTF16 codepoints througha well-defined encoding scheme.

Notable changes are:

  • We support extended ES6 escape sequences as is.
  • We support downlevel emit for ES6 escape sequences, using\uXXXX escapes for any non-ASCII characters in the original string.
  • Template stringsalways use\uXXXX escapes for any non-ASCII characters.

Things we still don't support:

  • Escapes in regular expressions.

...because caps lock is cruise control for cool.
…eSoManyWaysToDoItConflicts:src/compiler/diagnosticInformationMap.generated.tssrc/compiler/diagnosticMessages.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

'Unterminated unicode escape'

DanielRosenwasser added a commit that referenced this pull requestMar 3, 2015
…ThereWouldntBeSoManyWaysToDoItAdd support for extended Unicode escape sequences in strings and templates
@DanielRosenwasserDanielRosenwasser merged commit7212912 intomasterMar 3, 2015
@DanielRosenwasserDanielRosenwasser deleted the withANameLikeUnicodeYoudThinkThereWouldntBeSoManyWaysToDoIt branchMarch 3, 2015 20:16
@microsoftmicrosoft locked and limited conversation to collaboratorsJun 18, 2018
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ES6 extended Unicode syntax for strings and template strings

5 participants

@DanielRosenwasser@yuit@CyrusNajmabadi@msftclas

[8]ページ先頭

©2009-2025 Movatter.jp