Overview of Swift bindings for tree-sitter-language-pack
mainThis package provides Swift bindings for tree-sitter-language-pack, offering access to 371 pre-compiled tree-sitter grammars. It is built via swift-bridge and supports macOS, iOS, and Linux. The package provides native Swift types and supports async/await patterns.
Key Capabilities
- Parser access: Load any tree-sitter language parser by name without manually wiring individual grammar crates or packages.
- Code intelligence primitives: Extract parse trees, functions, classes, imports, exports, symbols, docstrings, diagnostics, and syntax-aware chunks.
- Shared cache model: Parsers are fetched and cached once upon first use and reused throughout the process.
- Syntax-aware chunking: Provides semantic chunks specifically designed for RAG (Retrieval-Augmented Generation) and LLM pipelines.
- Unified catalog: Uses the same grammar set as all other language bindings (Rust, Python, Node.js, etc.).