usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
406 stars 78 forks source link

Introduce a fixed set of syntax highlighting categories to replace the old string based categories in parse trees #1928

Open DavyLandman opened 7 months ago

DavyLandman commented 7 months ago

Right now people writing a grammar can add @Category annotations on their productions to get syntax highlighting in their IDE. It's been a bit of a mixed bag of what to write vs what you'll get. usethesource/rascal-language-servers#366 was a recent case of this misalignment.

After some more discussions with @jurgenvinju we came to the following design:

jurgenvinju commented 7 months ago

Thanks Davy. Minor note: the coding standard for tags is to start with lowercase, and for ADTs with uppercase. This helps to pry apart Highlight the ADT from @highlight=keyword() the tag name. Just like @synopsis{...}