Consider using Tree-Sitter
Closed this issue · 2 comments
I see you are using Chicken Scheme for C processing. I recommend taking a look at Tree-Sitter, it has many grammars, including C one:
- https://tree-sitter.github.io
- https://github.com/tree-sitter/tree-sitter
- https://github.com/tree-sitter/tree-sitter-c
Here you can see how different queries work with TS, including highlighting: https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/c
I agree with you that rolling my own syntax highlighting was not a very wise choice. While Scheme makes the code more concise that if I had used C, it's still quite messy. I would assume that Tree-Sitters overhead is also smaller than that of Chicken.
After pondering this for some time, I decided that Scheme is the way to go. Spray doesn't need fancy highlighting and I'd rather not add tree-sitter as a dependency. We love Scheme and I might just clean up the Scheme code sometime in the future.