diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-18 16:34:25 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-19 23:49:25 +0200 |
commit | 1259dc362376e8011d20d4d9e2fcc49d5b7f9dc9 (patch) | |
tree | 036a187528426197eb4b01301af5ab97bcced21f /Kernel/ProcessExposed.h | |
parent | c5b5c779ff9e10ce8b2538843c0f921b0f197907 (diff) | |
download | serenity-1259dc362376e8011d20d4d9e2fcc49d5b7f9dc9.zip |
LibJS: Allow Unicode escape sequences in identifiers
For example, "property.br\u{64}wn" should resolve to "property.brown".
To support this behavior, this commit changes the Token class to hold
both the evaluated identifier name and a view into the original source
for the unevaluated name. There are some contexts in which identifiers
are not allowed to contain Unicode escape sequences; for example, export
statements of the form "export {} from foo.js" forbid escapes in the
identifier "from".
The test file is added to .prettierignore because prettier will replace
all escaped Unicode sequences with their unescaped value.
Diffstat (limited to 'Kernel/ProcessExposed.h')
0 files changed, 0 insertions, 0 deletions