-
Notifications
You must be signed in to change notification settings - Fork 81
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
overloading async
as identifier and invoking as a method is not supported
#130
Comments
@trullock I haven't looked at the parser code, but maybe some logic like this could work?
|
@madelson perhaps take a look at the code |
Another case that's a little different than the examples above:
|
Thanks for the example As per the readme and above, I've not got the time to fix this. PRs welcome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you do this:
i.e. if you overload async as an identifier, and then call it as a function (with or without arguments) the parser will not understand this line and will strip it, removing the invocation
I don't know how to fix this without some serious rewriting of the parser, which I can't be arsed to do for such a sadistic case.
The issue can be seen in
JSParser
, line ~4075 inside theAsync
case.You end up in here because
async()
is an expression, but the parser (quite reasonably) expects you do be either doingasync () => { }
orasync function() { }
. The 2nd case is easily handled because of the unique presence offunction
, however diffrentiating between the former is not currently easy - at least I can't see how.Marking as
wontfix
because its such a mad case, but someone is welcome to tryThe text was updated successfully, but these errors were encountered: