summaryrefslogtreecommitdiff
path: root/Kernel/StdLib.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-08-18 16:34:25 -0400
committerAndreas Kling <kling@serenityos.org>2021-08-19 23:49:25 +0200
commit1259dc362376e8011d20d4d9e2fcc49d5b7f9dc9 (patch)
tree036a187528426197eb4b01301af5ab97bcced21f /Kernel/StdLib.cpp
parentc5b5c779ff9e10ce8b2538843c0f921b0f197907 (diff)
downloadserenity-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/StdLib.cpp')
0 files changed, 0 insertions, 0 deletions