<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: Console could be made useful for very simple await expressions"
href="https://bugs.webkit.org/show_bug.cgi?id=165681#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: Console could be made useful for very simple await expressions"
href="https://bugs.webkit.org/show_bug.cgi?id=165681">bug 165681</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">> > Sample Detection:
> >
> > 1. Input fail to parse normally.
> > 2. Input succeed parsing if wrapped in "(async function() {" + input
> > + "})"
>
> Are there conflicts? Could other syntax errors aside from `await` be made
> whole? If so we might need to sniff for the actual `await` keyword.</span >
Yes, if the user typed other keywords only valid in functions, such as `return`:
(c) return 10
So our verification of (2) would need to be smart about this. Basically we should verify the AST tree contains what we expect a single await expression (optionally wrapped in a single assignment expression) and not a return statement or something else.</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>