-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
certain bug: Illegal async arrow function parameter list #25
Comments
@KFlash have you considered doing something like https://github.com/rust-lang/crater#crater- against large/popular NPM or github repos? i think it would quickly uncover more "edge" cases. |
@leeoniya the best way to test it is to run against as many libraries as possible. That I can provide, FuseBox' users started adapting the new version based on meriyah. |
@leeoniya I will try to validate against as some libraries soon as I get time. ATM. What @nchanged mentioned is the best solution. Beside that I'm stress testing the code entire time, and run 3x different fuzzers and so on. But to be honest. It's a known issue for me that async and async arrows are troublesome because I'm parsing this in a different way than what the specs says to avoid tons of known issues from other parsers and V8 with async arrow + call expr. This so I can avoid performance bottlenecks. And sometimes I suddenly find more "edge cases" because one of my previous students did some code changes without knowing what he was doing as what happened with v. 1.4.5. |
const a = {
foo: () => {
},
bar: async event => {
}
); This bug hasn't been fixed. Which makes me think there are more similar cases. @KFlash please take a look at all possible variations. |
@nchanged Are you sure about this? Btw. Your example is invalid. Missing a right brace. If I modify your example into this, it pass for me const a = {
foo: () => {
},
bar: async event => {
}
} |
@nchanged FYI. This bug was caused because of a mutual parser flag and validation against it. This flag have been replaced with a func arg |
@leeoniya @nchanged Parsed a lot of libraries now but couldn't find any issues or "edge cases". |
version: 1.4.8
Snippet:
Throws
Illegal async arrow function parameter list
(also reproducible in the REPL)Observations: commenting out
const someVar = null;
fixes the problem.Can be found in the npm package
electron-updater
right herenode_modules/electron-updater/out/AppUpdater.js
Related issue: fuse-box/fuse-box#1570
Being parsed without any issues with
typescript
or babel or esprimahttps://astexplorer.net/#/gist/3e1e685684c77a841dd4452b677654f9/6e25a2a530fc046e1dc55f5f3285fa7d5acd20d0
The text was updated successfully, but these errors were encountered: