-
-
Notifications
You must be signed in to change notification settings - Fork 196
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: tokenize the latest right curly brace (fixes #403) #419
Conversation
Hi, thanks for contributing. It looks like there are some tests failing - do you mind fixing those so that we can review this? |
Hi @kaicataldo , thank you for quick response. |
Hi @finico, would you mind merging/rebasing upstream changes please? Thanks! |
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, thanks! I would like another team member to review before merging.
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. Thanks for contributing!
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, thanks so much for contributing! I apologize for any confusion in our review comments as I think I had something slightly different in mind from @kaicataldo 😄
There is a logic in
TokenTranslator::onToken
about the latest curly bracehttps://github.com/eslint/espree/blob/6ebc21947166399a0b4918d4a1beb9d610650336/lib/token-translator.js#L196-L204
But it executes only at first
eof
token (it seems strange that the first token iseof
, but it comes from Acorn's init state)I've added a call of
next
for theTokenTranslator::onToken
to be executed with the lasteof
tokenAnd I've noticed two failed tests, but they've already fixed at #416