Goodness knows @plt-abigail has seen enough screenshots over the last three hours, but for reference this PR adds support for folding ranges such as the following:
As they're all on the same indentation level, by default such an expression wouldn't be folded.
This PR also refactors the spans we use for function/match a little, to ensure it's more accurate. We now store two positions:
A "start" position. This is used for warnings about incomplete patterns, so we don't dominate the whole expression.
The actual span of the expression, from start to finish.
This does change the span of non-exhaustive patterns a little, but I think this is preferable - it's a little confusing when you're matching on a complex expression.
Non-exhaustive patterns in expression
│
7 │ match expr with
- │ ^^^^^^^^^^^^^^^
+ │ ^^^^^
Goodness knows @plt-abigail has seen enough screenshots over the last three hours, but for reference this PR adds support for folding ranges such as the following:
As they're all on the same indentation level, by default such an expression wouldn't be folded.
This PR also refactors the spans we use for function/match a little, to ensure it's more accurate. We now store two positions:
This does change the span of non-exhaustive patterns a little, but I think this is preferable - it's a little confusing when you're matching on a complex expression.