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
Should throw on for (async of []);
#190
Comments
@3cp It will be very challenging to fix this without a lookahead ... |
Then forgot about it 😂 |
undefined is not a keyword which is one of the initial design mistakes of JS. |
I think you can throw an error if you pass down an context mask or something. In the future I will figure out how to solve it without a lookahead, but for now this is how I solved it in Kataw. |
@3cp It's possible to solve this without a lookahead. Just return the 'async' identifier if you see the 'of' keyword and deal with the rest of the logic in 'parseForStatement'. Very easy to solve 👍 |
Babel PR babel/babel#13208
Prettier issue prettier/prettier#10777
The text was updated successfully, but these errors were encountered: