Allow binary operators after nested object literals and bulleted arrays, fix ++
with bulleted arrays
#1688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1687. This bug was introduced by #1628 which innocently added checking for
NestedImplicitObjectLiteral
s next toNestedBulletedArray
s inMaybeNestedExpression
.It turns out the "right" answer is to check for neither! Otherwise, we don't allow for binary operators after dedent after the nested object literal / bulleted array. Conveniently, we already check for
NestedImplicitObjectLiteral
andNestedBulletedArray
withinPrimaryExpression
(as part ofObjectLiteral
andArrayLiteral
respectively), so we don't need to do anything special here, except for stopping thePushIndent Nested PopIndent
check inMaybeNestedExpression
.Along the way, I fixed another issue with the concat operator
++
followed by a bulleted array. Previously, this broke for two reasons: (1)UpdateExpression
thought that this was an increment, despite the indentation after++
(needed to explicitly!Whitespace
to match the comment). (2)WRHS
did need to check explicitly forNestedImplicitObjectLiteral
andNestedBulletedArray
, likeMaybeNestedExpression
used to. (Here it's the right thing to do, because any further binary operators will be handled by the parentBinaryExpression
.)Also fixed some unrelated CI issues that seem to have come up just from 2025 deprecations.