jquery / esprima

ECMAScript parsing infrastructure for multipurpose analysis
http://esprima.org
BSD 2-Clause "Simplified" License
7.04k stars 786 forks source link

Support async generators #2101

Closed lahma closed 3 years ago

lahma commented 3 years ago

Async generators are valid constructs and went through issues parsing them. Couple issues surfaced on class handling side but unrelated to async generators per se.

Before

✔ 54265 valid programs parsed without error ✔ 6748 invalid programs produced a parsing error ✔ 1101 invalid programs did not produce a parsing error (and allowed by the whitelist file) ✔ 16288 valid programs produced a parsing error (and allowed by the whitelist file)

After

✔ 60262 valid programs parsed without error ✔ 6747 invalid programs produced a parsing error ✔ 1102 invalid programs did not produce a parsing error (and allowed by the whitelist file) ✔ 10291 valid programs produced a parsing error (and allowed by the whitelist file)

fixes #1990

lahma commented 3 years ago

Hi @ariya ! Here's a PR to allow parsing about 6000 more scripts that were unparseable before, basically allowing async generators and couple more error checks.

ariya commented 3 years ago

Great work @lahma, thanks! I will take a look.

lahma commented 3 years ago

@ariya friendly ping from here 🙂 it would also be great if you have time to check https://github.com/jquery/esprima/pull/2082 , the new fork of Esprima is running far ahead already..

EDIT and the very moment you check, sorry for pinging 🤦🏻‍♂️

lahma commented 3 years ago

@ariya anything you want me to tweak here?

ariya commented 3 years ago

Thank you @lahma 👍

lahma commented 3 years ago

You're most welcome, thanks for merging!

jogibear9988 commented 2 years ago

@lahma i've merged your changes also in my fork