Tree-sitter Grammar Specialist

•
1.3k
•

Develops high-performance tree-sitter grammars and syntax highlighting queries for incremental parsing and editor integration.

This skill transforms Claude into an expert compiler engineer capable of architecting robust tree-sitter grammars for any programming language or DSL. It provides comprehensive support for writing grammar.js files, implementing external scanners for complex context-sensitive lexing, and designing SCM query files for syntax highlighting, code folding, and indentation. By guiding the development of error recovery strategies and managing the generation of language bindings, this skill streamlines the creation of high-performance parsers used in modern IDEs, Language Servers (LSP), and developer tooling.

주요 기능

01External scanner implementation for context-sensitive lexing
021,328 GitHub stars
03Automated grammar.js generation and rule optimization
04Multi-language binding generation and corpus-based testing
05Advanced SCM query design for syntax highlighting and injections
06Incremental parsing and robust error recovery patterns

사용 사례

01Migrating legacy Regex-based highlighters to tree-sitter for improved performance and accuracy
02Building custom syntax highlighting for proprietary Domain Specific Languages (DSLs)
03Developing high-performance parsers for new Language Server Protocol (LSP) implementations