Skip to main content

tree-sitter-carve

Tree-sitter grammar for Carve, a lightweight markup language for readable source and structured documents.

It provides editor-facing parsing, highlighting, and structural navigation for Carve syntax, including:

  • /italic/, *bold*, and /*bold italic*/
  • =highlight=, plus the braced-only {^superscript^} and {,subscript,} (a bare ^ or , is literal text)
  • $ plus backtick math spans, and $$ plus backtick display math spans
  • :name[content] inline extensions, @mentions, #tags, and :emoji:
  • %% line comments, trailing inline %% comments, and %%% fenced comments
  • headings, lists, tables, fenced code, links, images, attributes, footnotes, captions, and divs

Scope

This repository is the grammar layer, not the canonical parser or renderer. It aims to produce useful, error-free syntax trees for the covered Carve corpus. The Carve specification defines the language; engine conformance and rendered output are checked in their respective implementation repositories.

The grammar is intentionally explicit about unsupported corpus categories. test/coverage.json records each category as covered or skipped with a reason, so new syntax cannot silently fall outside the checks.

Browser use

Each release ships tree-sitter-carve.wasm in the npm package and as a GitHub release asset. Copy that file to a URL served by your application, then load it with web-tree-sitter:

import { Language, Parser, Query } from "web-tree-sitter";

await Parser.init();
const carve = await Language.load("/parsers/tree-sitter-carve.wasm");
const parser = new Parser();
parser.setLanguage(carve);

const tree = parser.parse("# Hello");
const highlights = await fetch("/queries/carve-highlights.scm").then(
  (response) => response.text(),
);
const query = new Query(carve, highlights);
const captures = query.captures(tree.rootNode);

The npm copy is at node_modules/tree-sitter-carve/tree-sitter-carve.wasm. The matching release asset includes a .sha256 checksum. Highlight and injection queries are in the package's queries/ directory.

CI tests this grammar with web-tree-sitter 0.22.6 and 0.27.0. Version 0.22.6 uses the older default Parser export and language.query(...) API; the example above uses the 0.27.0 API.

Development

Contributor setup, corpus checks, generated-artifact hygiene, and maintenance notes are in the development guide. The September 30 audit records remaining syntax gaps and the added editor queries.

Metadata

Release files for tree-sitter-carve 0.1.11

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-carve 0.1.11
File Size Uploaded Provenance
tree_sitter_carve-0.1.11.tar.gz 1.8 MB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-carve 0.1.11
File
tree_sitter_carve-0.1.11-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
tree_sitter_carve-0.1.11-cp38-abi3-win32.whl CPython 3.8 abi3 Windows x86-32 Details
tree_sitter_carve-0.1.11-cp38-abi3-musllinux_1_2_x86_64.whl CPython 3.8 abi3 Linux musl 1.2+ x86-64 Details
tree_sitter_carve-0.1.11-cp38-abi3-musllinux_1_2_i686.whl CPython 3.8 abi3 Linux musl 1.2+ x86-32 Details
tree_sitter_carve-0.1.11-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
tree_sitter_carve-0.1.11-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-32, Linux glibc 2.5+ x86-32 Details
tree_sitter_carve-0.1.11-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details

Total release size: 6.7 MB

Release files / tree_sitter_carve-0.1.11.tar.gz

Download URL tree_sitter_carve-0.1.11.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
70e64b3a1143a544cc13e18caf0e1b201956774fa3852bf06b6dd7f1d5703077
BLAKE2b-256 checksum
How to use checksums
d06a831dab2a09a35f89ea1ba5da79375c5b922ca2f26b5bc9b9084a6ef6290a
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_carve-0.1.11-cp38-abi3-win_amd64.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-win_amd64.whl
Size 483.5 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0ee39951bb35d0196e63dc25100182c86eb83ee9f21ae324968f573f42b1373d
BLAKE2b-256 checksum
How to use checksums
cc28474f4a994fd740f0c2bd10974c6e94a998314ce6dfcaacb3d4a3d0c5c78d
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_carve-0.1.11-cp38-abi3-win32.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-win32.whl
Size 480.0 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
c6294b4d5b47acc238160dd9f35fa5544540133c009c706d18bc3d1252e7dabe
BLAKE2b-256 checksum
How to use checksums
9ac0adfdaf9e66ca20c58c33cf51b923453f150854c2fe8b81d7510103285df8
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_carve-0.1.11-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-musllinux_1_2_x86_64.whl
Size 826.7 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
7cb4156bad09e7751d86ae3c8452c23ee57106029045f79179bc812c99a6eb07
BLAKE2b-256 checksum
How to use checksums
33f4af043ea76baa4c6dec39d59422fd04ca05163172e886adf45374f93ee96b
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_carve-0.1.11-cp38-abi3-musllinux_1_2_i686.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-musllinux_1_2_i686.whl
Size 828.1 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
48afe9739f4470dbb60ccb2e8e9ba0e65003eb78667a33578f81ec7418e4647a
BLAKE2b-256 checksum
How to use checksums
0381a2c68224a42af912c242dc3b70bdf5e51ea83486e5b6651afcbb4fa0445e
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_carve-0.1.11-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 843.2 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
1169d64dae747ebeae3e42c15e8987ea7fd72b95c540782be59b34f5ee1d6a38
BLAKE2b-256 checksum
How to use checksums
4b93f34f770bf8c65abf278fb6a515aa375d1b4603904b27010f345f138ec048
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_carve-0.1.11-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 839.4 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
172df828ab64580be9c8a92be4ee69ef775e1dfc35bd6d6004e3469019429ce1
BLAKE2b-256 checksum
How to use checksums
b6fd7571eddf7395672c71fd432b3c8ea32a645553f8a58b3abecca2dcc9b002
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_carve-0.1.11-cp38-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_carve-0.1.11-cp38-abi3-macosx_11_0_arm64.whl
Size 542.9 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
263625772888f982aad6fe0907c4b134f94cdaf3573b9fedd689be8f274c38b3
BLAKE2b-256 checksum
How to use checksums
413e6818f316d7750198821ca08d750c4ed93dc26920390c382473c50d39d370
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-carve 0.1.11

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.

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