Swiftpack.co - krzyzanowskim/tree-sitter-xcframework as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by krzyzanowskim.
krzyzanowskim/tree-sitter-xcframework 0.208.5
binary build of tree-sitter for apple platforms
⭐️ 37
🕓 8 weeks ago
iOS macOS
.package(url: "https://github.com/krzyzanowskim/tree-sitter-xcframework.git", from: "0.208.5")

A module for the tree-sitter incremental parsing system. The tree-sitter has both runtime and per-language dependencies. They all have to be build separately. For a purpose of this project per-language dependencies are part of the resulting tree_sitter.xcframework.

The tree_sitter.xcframework binary comes with:

This is a work-in-progress. But, if the parser you'd like to use doesn't have a Makefile, let me know and I'll help get it set up.


Swift Package Manager

dependencies: [
    .package(url: "https://github.com/krzyzanowskim/tree-sitter-xcframework", from: "0.208.4")


Accessing the parsers directly:

import TreeSitter

let parser = tree_sitter_swift()
let parser = tree_sitter_ruby()

Via the included "TreeSitterResource" abstraction:

import TreeSitterResource

let swift = TreeSitterLanguage.swift

let url = swift.highlightQueryURL
let parserPtr = swift.parser

Suggestions or Feedback

I'd love to hear from you! Get in touch via twitter @krzyzanowskim, an issue, or a pull request.


Stars: 37
Last commit: 8 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics