Skip to content

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Oct 5, 2025

// CoalesceExpressionHead:
// CoalesceExpression
// BitwiseORExpression
OperatorPrecedenceCoalesce = OperatorPrecedenceLogicalOR
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, I could make the OperatorPrecedenceCoalesce lower than OperatorPrecedenceLogicalOR and then handle that change from Strada in parseBinaryExpressionRest and its computation of consumeCurrentOperator (and maybe in some other places too). cc @weswigham

case ast.OperatorPrecedenceAssignment:
// assignment is right-associative
leftPrec = ast.OperatorPrecedenceLeftHandSide
case ast.OperatorPrecedenceCoalesce:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to remove it because it would now be a duplicate case - but it seems that with the current logic I don't even have to move this code anywhere as nothing has regressed

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.

1 participant