-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fix parsing of optional chaining in new expressions and decorators #393
Conversation
d6ac5a5
to
80defbd
Compare
Now sure if I can be of much help here, always appreciate you improving the parsing though! I've usually looked at acorn for ideas on how to accomplish some specific parsing scenarios in the past. |
Thanks for the tip. Acorn just passes a flag down the call stack to implement the necessary check. In Esprima it's a bit more complicated because And while being at it, I also fixed #394. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, seems naturally follow common patterns like previous-reset for flags and reads well. Nicely done once again!
46d357e
to
ffc967a
Compare
How about pushing out a new RC? :) If you could do it, I could finish the regex story in Jint. |
I of course can, but would you like to do the honors this time? Just to make sure we don't have dependency on single entities (like me or Sebastien). Just create the tag with the name following earlier tags against latest main, push against origin and rock'n'roll 🚀 Just say so and I'll do it, just testing how you would feel about it (convo about whether to push is of course nice, but you master the features at the moment). |
If it's that simple, no problem. :) I'll give it a shot. |
What is this sorcery, you have accomplished the task of publishing an Esprima release to nuget.org, congrats! 🚀 |
Takes a crack at #322 (However, addresses only new expressions because decorators seem to have bigger issues ATM).
The fix involves keeping track of the last processed token, which I'm not completely comfortably with TBH. But other approaches look much more complicated. Could someone more familiar with the parser take a look at this?