Swift API for the tree-sitter incremental parsing system. The SwiftTreeSitter target is a close match to the C runtime API. It adds only a few additional types to help support querying. It is fairly low-level, and there will be significant work to use it in a real project. SwiftTreeSitterLayer is an abstraction built on top of SwiftTreeSitter. It supports documents with nested languages and transparent querying across those nestings. It also supports asynchronous language resolution. While still low-level, SwiftTreeSitterLayer is easier to work with while also supporting more features.

Features

  • Close to full coverage of the C API
  • Swift/Foundation types where possible
  • Standard query result mapping for highlights and injections
  • Query predicate/directive support via ResolvingQueryMatchSequence
  • Nested language support
  • Swift concurrency support where possible

Project Samples

Project Activity

See All Activity >

Categories

System

License

BSD License

Follow SwiftTreeSitter

SwiftTreeSitter Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SwiftTreeSitter!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Swift

Related Categories

Swift System Software

Registered

2024-09-13