Skip to main content

tree-sitter-compact

CI crates

Compact grammar for tree-sitter.

This grammar parses the entire Compact programming language. It is based on the formal grammar published by the Midnight Foundation.

Compatibility

This grammar targets Compact language 0.23.0 and newer (toolchain 0.31.1 and newer, runtime 0.16.0), the version supported on Midnight mainnet. Support starts at 0.31.1: the grammar accepts the language as defined by that toolchain and no longer accepts legacy syntax such as top-level body-less circuit declarations or the old assert expr "msg"; statement. See the compatibility matrix for details.

Grammar Compact language Compact toolchain
0.2.x 0.23.0 0.31.1
0.1.x 0.23.0 0.31.1

The grammar follows independent Semantic Versioning: the parse tree is the public API, so adding nodes or fields is a minor release and breaking tree changes are major. The supported Compact version is tracked in this table and in the package metadata, not in the grammar version.

Grammars are validated against the compiler's own corpus with scripts/conformance.sh; see scripts/grammar-delta.sh for checking a new Compact release.

Fork

This repository is a community fork of midnightntwrk/compact-tree-sitter. The upstream project is archived and no longer maintained, so this fork is developed and maintained independently.

It remains licensed under the Apache License 2.0, the same license as the upstream project. See NOTICE for attribution.

Features

  • Incremental — after an edit, tree-sitter updates the existing syntax tree and reuses the unchanged parts of it, so re-parsing is usually sub-millisecond.
  • Bindings — first-class bindings for C, Go, Node.js, Python, Rust, and Swift.
  • Highlighting — ships a highlights.scm query for syntax highlighting.
  • WASM — can be compiled to WebAssembly for use in the browser and editors.

Usage

Node.js

const Parser = require("tree-sitter");
const Compact = require("tree-sitter-compact");

const parser = new Parser();
parser.setLanguage(Compact);

Rust

[dependencies]
tree-sitter = "0.25"
tree-sitter-compact = "0.1"

Python

import tree_sitter_compact

References

License

Apache License 2.0

Metadata

Release files for tree-sitter-compact 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-sitter-compact 0.2.0
File Size Uploaded Provenance Actions
tree_sitter_compact-0.2.0.tar.gz 87.1 kB Without provenance Details for tree_sitter_compact-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-compact 0.2.0
File Actions
tree_sitter_compact-0.2.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for tree_sitter_compact-0.2.0-cp310-abi3-win_arm64.whl
tree_sitter_compact-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for tree_sitter_compact-0.2.0-cp310-abi3-win_amd64.whl
tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
tree_sitter_compact-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details for tree_sitter_compact-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
tree_sitter_compact-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.10 abi3 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details for tree_sitter_compact-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
tree_sitter_compact-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for tree_sitter_compact-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
tree_sitter_compact-0.2.0-cp310-abi3-macosx_10_9_x86_64.whl CPython 3.10 abi3 macOS 10.9+ x86-64 Details for tree_sitter_compact-0.2.0-cp310-abi3-macosx_10_9_x86_64.whl

Total release size: 528.6 kB

Release files / tree_sitter_compact-0.2.0.tar.gz

Download URL tree_sitter_compact-0.2.0.tar.gz
Size 87.1 kB
Tags Source
SHA-256 checksum
How to use checksums
adffa263293c7a8683f33d8e78ae4c11f1eed3b4ef2f333f62b18b50da93fd4c
BLAKE2b-256 checksum
How to use checksums
35d262f1fa524285eef33ffb334dfd221042f14eda9d16bfa4ee38e978fc8857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-win_arm64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-win_arm64.whl
Size 52.7 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
113bbac0a851c8554a432537587fb89a3b841265f68f804a5ead9809699824b9
BLAKE2b-256 checksum
How to use checksums
76297e7c8372a974a72c88dd71ba2d14b52c52d9a55b4814efbcf202bbba44b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-win_amd64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-win_amd64.whl
Size 53.0 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
af740cb2fdf54c7e6f3c46b1921e9aec89b3bb93048bb5f74c1fd12359422c12
BLAKE2b-256 checksum
How to use checksums
487f7ab2585029469abe649a19553955bcba885388cb066735b93457af82ef58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 59.0 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b12801743ecdb1924f87f1a4993d70b8855fb6231dbfc04f92f9c064dfdafa55
BLAKE2b-256 checksum
How to use checksums
c873a6a38cdb4bb40baee687f87c07c83a7c421f5bcbd1324949b65c9142148f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 59.0 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
d5c2bae7f0cffc52ff4d98f346ec68d88f9fb6adfbc123868a22ff034381192f
BLAKE2b-256 checksum
How to use checksums
faae7f4f6c5765413c53c4596f0a22e71b7ab3bde1106861d46ce973ab863546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 59.7 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0d0275003370f364e9301928e3a2c03977422360a4fdfe814822172429d3a0b8
BLAKE2b-256 checksum
How to use checksums
3e3c19abeca8b2102146f1a905e998e88d3a0f1f7e0493631f32a590bee90621
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 59.0 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
4bbea2610b5c1a4aa0ca28635494b854b5ce84a002679cb75090703936dedf66
BLAKE2b-256 checksum
How to use checksums
9063292884e208c6f542cd6107704d2d3e03b63a8bf08e1fc94d807b03898c6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 50.4 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f6515fa9432068b0937f96e392341ffa3d9bdbc927d73c567ce3ac1527e504d9
BLAKE2b-256 checksum
How to use checksums
4a0958111bd4920d6372af3d7839220b72c3e9a9ad973c14712f8d89837c5d44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tree_sitter_compact-0.2.0-cp310-abi3-macosx_10_9_x86_64.whl

Download URL tree_sitter_compact-0.2.0-cp310-abi3-macosx_10_9_x86_64.whl
Size 48.6 kB
Tags CPython 3.10 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
f8c39d37c2d57d3d799166e3b64669346506e172c2a51cef60deed6858a9a6c8
BLAKE2b-256 checksum
How to use checksums
6e27f247f47c2e60466eb3a6257d0053acde2ae0e110b9ba138df17ae354d56b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for tree-sitter-compact 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

9 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page