jeff-hykin / experimental-tree-sitter

💾 The hub for getting a VS Code Tree Sitter working
MIT License
18 stars 0 forks source link

Add support for context-specific highlighting #8

Open jeff-hykin opened 5 years ago

jeff-hykin commented 5 years ago

examples of context-dependent highlighting are: user defined macros in C/C++, tagging of parameters inside of a function body (rather than only inside the function-declaration), and anything that would require the parser to remember the name of something.

I didn't know this was realistic until maxbrunsfeld pointed it out here

This would require more than just the tree sitter, and would be hard to parse efficiently. However, it is possible to use in conjunction with the tree sitter, and it would add some really powerful language features, and fix some long standing bugs.