proposal: create TextMate-Compatible Grammar for C3
I’ve been exploring the process of adding C3 language support to GitHub Linguist for syntax highlighting. As per Linguist’s requirements, it only supports TextMate-compatible grammars for syntax highlighting.
Currently, the C3 repository has an excellent Tree-sitter grammar (tree-sitter-c3), but there doesn’t seem to be a TextMate-compatible grammar available
I think there is a sublime highlighting, is that one TM compatible?
There already is a TextMate grammar here, but it's probably important that I remove the distinction between top- and function-level at some point so it becomes a suitable grammar for parsing code snippets.
@cbuttner Is this one up to date with the latest changes to the grammar?
The grammar is now up to date.
Can we get a compiled version somewhere too?
@lerno I'm not sure what you mean, the TextMate grammar is just a json file.
I am confused, there are two files there and I think traditionally the grammar is just a single file. Is it the same thing in two formats?
The json file is generated from the yml file using the vscode-c3/build_syntax.js script.
here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter
This is now completed.