go-highlight
go-highlight copied to clipboard
CMake
Hi,
Hope you are all well !
I was looking at your great repo as I was working on a some small script trying to parse CMake files (CMakeLists.txt or *.cmake) and output a yaml with a graph of dependencies and get the list of install targets, or other scans.
I found some lexers, in different languages, where variables are grouped by typology (builtin_commands, predefined_variables, ...):
- https://github.com/Komodo/KomodoEdit/blob/d0fe723a7d39d08a207b8d45a94bd12cb756b039/src/languages/koCMakeLanguage.py
- https://github.com/estospanas/estospanas.github.io/blob/e53cc6eaa1f9fdad03430aec71c8d7e9aaa435a5/_vendor/ruby/2.0.0/gems/rouge-1.11.1/lib/rouge/lexers/cmake.rb
- https://github.com/julp/shall/blob/d5d11fb6e2b35d16bd189d5964e133ad5a4d1eb5/lib/lexers/cmake.re
I wanted to store the languages definitions into etcd, so that's why your repo is awesome ,so I could make changes into defintions in real-time (more convenient).
So, my quick question is related about a small override of highlight.js defintions, in order to highlight or generate a different output of the CMake AST (JSON, YAML) or other language parsing flows.
How would you implement that from your point of view ?
Cheers, Richard