3 ms·
I like the idea of tutorials for generating language grammars [1]. I've made a couple grammars myself for both Atom and vscode and I can never find as much info
by jakear 9y ago
I like the idea of tutorials for generating language grammars [1]. I've made a couple grammars myself for both Atom and vscode and I can never find as much info as I'd like. For instance, what labels should various tokens get in order to have them show up as the proper semantic constructs in syntax themes? Last I checked, it was difficult to find a reference of what "standard" syntax themes recognize, and I ended up just looking through the source of existing themes for labels to try.
Going beyond a tutorial, what could be really cool is a GUI where someone can paste in a code snippet of a language they want to colorize, then manually go through tokens classifying them as literals/keywords/whatever. Making a proper grammar for an entire language just to get some basic colorization gets old fast.
[1] https://github.com/atom/flight-manual.atom.io/pull/374 https://github.com/atom/flight-manual.atom.io/pull/374