unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.64k stars 267 forks source link

Improve some lexer error messages #5108

Closed sellout closed 4 days ago

sellout commented 1 week ago

Overview

The message mentioned in #5060 was incorrect. This also uses the passed-in id for that message and related messages (removing the reliance on ANSI colors for conveying where the error is). And it adds a suggestion on how to avoid the error.

It also does some minor adjustment of highlighting – styling individual identifiers rather than a list of them.

Fixes #5060.

ceedubs commented 1 week ago

Thanks!

Should the example in #5060 (or something like it) be added to a transcript to avoid a regression?

sellout commented 1 week ago

There were two transcripts that already tested this – I just forgot to commit the changed output.

And I accidentally rebased on trunk. C’est la vie.