Skip to content

Fix implicit calls with preceding herecomment #2933

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

Merged
merged 2 commits into from
Apr 29, 2013

Conversation

marchaefner
Copy link
Collaborator

Simple fix for #2916: Use @matchTags to skip herecomments only after the current token has been recognized as IMPLICIT_FUNC.

@@ -251,7 +251,7 @@ class exports.Rewriter
# which is probably always unintended.
# Furthermore don't allow this in literal arrays, as
# that creates grammatical ambiguities.
if @matchTags(i, IMPLICIT_FUNC, 'INDENT', null, ':') and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work because the herecomment specialcasing ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly that. The reported bug is caused by matchTags skipping the herecomment and then matching IMPLICIT_FUNC, ..., which results in CALL_START being inserted after the herecomment.

@jashkenas
Copy link
Owner

Mind fixing the spacing in your commit? After that, feel free to merge.

@marchaefner
Copy link
Collaborator Author

Prettified and merged.

michaelficarra added a commit that referenced this pull request Apr 29, 2013
Fix implicit calls with preceding herecomment
@michaelficarra michaelficarra merged commit 3650d6e into jashkenas:master Apr 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants