<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Confusing error message when closing curly brace is missing in a template literal string"
href="https://bugs.webkit.org/show_bug.cgi?id=149134#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Confusing error message when closing curly brace is missing in a template literal string"
href="https://bugs.webkit.org/show_bug.cgi?id=149134">bug 149134</a>
from <span class="vcard"><a class="email" href="mailto:joepeck@webkit.org" title="Joseph Pecoraro <joepeck@webkit.org>"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
<pre><span class="quote">> >>> var foo = 123; var bar = `aaa bbb '${typeof foo'.`; 42;</span >
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)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>