[Webkit-unassigned] [Bug 149134] Confusing error message when closing curly brace is missing in a template literal string
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 14 15:18:09 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=149134
--- Comment #1 from Joseph Pecoraro <joepeck at webkit.org> ---
> >>> var foo = 123; var bar = `aaa bbb '${typeof foo'.`; 42;
There are a couple interesting things here.
(1) The error comes from attempting to start parsing the nested template string:
This is valid: ` ... ${ ... `nested` }`
In the above, the nested template is `; 42;<EOF>`.
(2) We could have errored out sooner, in cases like:
foo.' (tokenizes a string)
foo.` (tokenizes a template string)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150914/88e3b7ba/attachment.html>
More information about the webkit-unassigned
mailing list