Microsoft/TypeScript

Make private field name parsing ecma 262 compliant

Open

#50.883 geöffnet am 21. Sept. 2022

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (1 zugewiesene Person)TypeScript (6.726 Forks)batch import
BugDomain: ParserEffort: ModerateHelp WantedRescheduled

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

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

Considerations:

  • https://github.com/microsoft/TypeScript/pull/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 https://github.com/microsoft/TypeScript/issues/50835

Contributor Guide