icerpc / slicec

The Slice compiler library
Apache License 2.0
13 stars 5 forks source link

Improve Syntax Error Messages #348

Open InsertCreativityHere opened 1 year ago

InsertCreativityHere commented 1 year ago

Common syntax mistakes should be given dedicated error messages.

All other syntax error messages should be cleaned up to be more human readable. Right now they leak the identifiers of tokens, which is subpar. For example: expected one of "{", but found 'Comma' This could be improved considerably.

InsertCreativityHere commented 1 year ago

A not-obvious, but clear example that needs fixing is: https://github.com/icerpc/slicec/issues/516#issue-1662739793