Since there's already a binding for Swift that's listed on Tree-sitter's site (https://github.com/ChimeHQ/SwiftTreeSitter), it'd be great to list in your ReadMe how your implementation differs/is better than that one!
- Tree-Sitter Kit is a higher-level toolkit that simplifies creating and using tree-sitter parsers in Swift, providing a more integrated and Swift-friendly approach to defining and working with grammars and parsed data structures: https://github.com/daspoon/tree-sitter-kit
This Tree-Sitter Kit looks like a convenience layer on top of the tree-sitter system, designed to work smoothly within Swift, making the process of creating and using parsers more straightforward and idiomatic within the Swift language itself.
My understanding is that work exposes nearly the full tree-sitter runtime API, but relies on tree-sitter's standard tech for converting javascript grammar specifications to separately compiled C code.
This work instead exposes a minimal subset of tree-sitter functionality, but enables defining parsers entirely in Swift -- eliminating the need for javascript and mixed-language targets, and streamlining the build process.
There are bindings for Swift, parsers for Swift source, and this utility kit for Swift which seems more focused:
- Tree-Sitter Bindings for Swift provides the foundational tools to use tree-sitter’s parsing capabilities in Swift: https://github.com/ChimeHQ/SwiftTreeSitter
- Tree-Sitter Parser for Swift is a specific implementation that allows tree-sitter to parse Swift code: https://github.com/alex-pinkus/tree-sitter-swift
- Tree-Sitter Kit is a higher-level toolkit that simplifies creating and using tree-sitter parsers in Swift, providing a more integrated and Swift-friendly approach to defining and working with grammars and parsed data structures: https://github.com/daspoon/tree-sitter-kit
This Tree-Sitter Kit looks like a convenience layer on top of the tree-sitter system, designed to work smoothly within Swift, making the process of creating and using parsers more straightforward and idiomatic within the Swift language itself.