Skip to content
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

Parenthesize function at start of sequence #1057

Merged
merged 1 commit into from
Feb 5, 2022

Conversation

djpohly
Copy link
Contributor

@djpohly djpohly commented Feb 4, 2022

The firstInStatement function was missing the first child of a
SequenceExpression because it needs to check both the type of the parent
node and the name of the parent path element, which are not the same
in this case.

This fix is a "minimal change" style; it should be correct even if it's
not beautiful. A cleaner fix would probably involve changing the way
the loop finds nodes.

The firstInStatement function was missing the first child of a
SequenceExpression because it needs to check both the type of the parent
*node* and the name of the parent *path element*, which are not the same
in this case.

This fix is a "minimal change" style; it should be correct even if it's
not beautiful.  A cleaner fix would probably involve changing the way
the loop finds nodes.
@eventualbuddha
Copy link
Collaborator

As far as I can tell, this seems safe. I'll merge it soon unless @benjamn objects.

@eventualbuddha eventualbuddha merged commit 60cd756 into benjamn:master Feb 5, 2022
@coderaiser
Copy link
Contributor

coderaiser commented Feb 11, 2022

Looks like, it's related to #1061

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.

3 participants