fmease / lushui

The reference compiler of the Lushui programming language
Apache License 2.0
5 stars 0 forks source link

Add note when encountering reserved punctuation #75

Open fmease opened 3 years ago

fmease commented 3 years ago

In cases where we expect punctuation among other things (general identifiers, …) but we encounter a reserved punctuation that is invalid in this context, add a note to the "found-but-expected"-diagnostic since it is a bit confusing for newcomers to read a message like "found :: but expected punctuation or identifier" as :: is actually punctuation, albeit reserved.

The note should explain that the specific reserved punctuation is admittedly punctuation but it is reserved/assigned a special meaning in other contexts and it is invalid in this one.