Don't introduce a block around y in parsing x' = y
#60246
Merged
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.
Closes #59911.
'is generally treated as its own thing in Expr and flisp, but treated as a special type of call in JuliaSyntax. This change makesx' = yparse to the <=1.11(= (|'| x) y)instead of wrapping the body in a block like we do when parsingf(x) = y.The special case is fine to me given that it's a more understandable parse, and we're hoping to move away from LineNumberNodes in the future anyway. (I think this was the original reason for the block-wrap for
f(x) = y).Backporting will be a pain. My plan is to get this reviewed, then make a branch
backports-xin the separate JuliaSyntax repository and push this change directly to it, then make a version bump PR to this repository'sbackports-release-xforxin 1.12, 1.13. Suggestions for how to improve this situation are welcome!