Rollup merge of #141003 - clubby789:ternary-improve, r=compiler-errors

Improve ternary operator recovery

This
- Improves the span of the error to not point at the next token
- Where possible, we use the span of the condition to further improve the span of the error to include the cond, and suggest a maybe-incorrect fix

Currently this works on free expressions, not let statements; some more refactoring would be needed to pass the span down, which I'm not sure is worth doing.

### Old
![image](https://github.com/user-attachments/assets/5688cefc-e4ef-4135-a5ba-340ce05ae6f3)

### New
![image](https://github.com/user-attachments/assets/154f5380-e0c8-42c7-9bf8-0adb3d0433fa)
This commit is contained in:
Matthias Krüger 2025-05-16 07:19:41 +02:00 committed by GitHub
commit 094936e61c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Diff Content Not Available