Skip to content

Parenthesize function at start of sequence#1057

Merged
eventualbuddha merged 1 commit intobenjamn:masterfrom
djpohly:parens-function-in-seqexp
Feb 5, 2022
Merged

Parenthesize function at start of sequence#1057
eventualbuddha merged 1 commit intobenjamn:masterfrom
djpohly:parens-function-in-seqexp

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