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.
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.