Closed belden closed 11 months ago
Hi!
Thanks for the excellent report, both cases should work now.
@dgutov Thanks for the fast fix! Indeed, both toy scripts render correctly now.
Thanks for checking. I've tagged a new release too, so that the fix is out to stable channels.
js2-mode
struggles with this code.async *...
withinclass
context seems not to be recognized. The parsed function ends up not being set as async, which means theawait
is incorrectly flagged as occurring within a non-async function ("msg.bad.await"
).There's also a superflous complaint from the code above that the
*
at*all
requires a colon ("msg.no.colon.prop"
).📸 click here to see screenshot
![image](https://github.com/mooz/js2-mode/assets/361683/27d66887-d14f-42fa-acf1-43d2f8e80079)Similar, but not identical, parsing errors occur when converting the above code to a simple object. In this next example, the
*
in*all
still shows an error ("msg.no.colon.prop"
). The function is not recognized as a generator though, sinceyield
also shows an error ("msg.bad.yield"
).📸 click here to see screenshot
![image](https://github.com/mooz/js2-mode/assets/361683/44fecd46-28ca-4146-baca-d07cf7261ecd)In both cases, both pieces of code really do run, and simply log
1\n2\n3\n
.My environment:
HEAD
at 79bc78d)