llvm-project
f03ff95c - [lldb] Add tree-sitter based syntax highlighting (#181279)

Commit
63 days ago
[lldb] Add tree-sitter based syntax highlighting (#181279) This adds the necessary infrastructure to use tree-sitter for syntax highlighting in LLDB. It provides the base class for a tree-sitter highlighter plugin. Its primary function is interfacing with the tree-sitter library, and converting captures to highlighting styles. Adding a new tree-sitter highlighter consists of creating an LLDB plugin that inherits from this class. The plugin has two core responsibilities: 1. Loading the tree-sitter grammar. 2. Specifying the tree-sitter syntax highlighting query. Everything else is handled by the base class, making it extremely easy to add a new language. For more context and the motivation behind using tree-sitter for syntax highlighting, see #170250.
Author
Parents
Loading