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

Make private field name parsing ecma 262 compliant #50883

Open
amcasey opened this issue Sep 21, 2022 · 1 comment
Open

Make private field name parsing ecma 262 compliant #50883

amcasey opened this issue Sep 21, 2022 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@amcasey
Copy link
Member

amcasey commented Sep 21, 2022

This file has parse errors, but probably shouldn't.

Considerations:

  • Improve escape sequence handling in private names #50856 added support for starting with a unicode escape
  • The names #ZW__NJ and #ZW__J contain \u200c and \u200d, respectively (not here, but in the file)
  • Support for extended unicode escapes (i.e. \u{6F}, rather than \u006F) depends on ES2015, but we appear to parse the file as ES5.
  • Converting the extended unicode escapes to regular unicode escapes does not seem to eliminate the errors

Discovered as part of #50835

@DanielRosenwasser DanielRosenwasser self-assigned this Sep 21, 2022
@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Sep 21, 2022
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.9.1 milestone Sep 21, 2022
@DanielRosenwasser DanielRosenwasser added Help Wanted You can do this Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". labels Sep 21, 2022
@DanielRosenwasser
Copy link
Member

The extended Unicode escapes in ES5 issue is intermingled with regular identifiers; the current direction I had for extended escapes was to conditionally add a property and mark such nodes as ContainsES2015, but there were some issues in the transformer that I ran into.

If someone can beat me there, great! Though give me a heads up if you do decide to start working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

No branches or pull requests

3 participants