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.14

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.14
File Size Uploaded Provenance Actions
tree_sitter_carve-0.1.14.tar.gz 1.9 MB Without provenance Details for tree_sitter_carve-0.1.14.tar.gz

Built distributions (wheels)

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

Total release size: 7.2 MB

Release files / tree_sitter_carve-0.1.14.tar.gz

Download URL tree_sitter_carve-0.1.14.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
bfc1120264b4d8e391b4fb6182b51cdc7d3a506095f4894aaa1c87e2313c4fe0
BLAKE2b-256 checksum
How to use checksums
3cb0b8b319eccfcd14dcb950161725251ecd381ecc74ee792fd804c65ddfda16
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.14-cp38-abi3-win_amd64.whl

Download URL tree_sitter_carve-0.1.14-cp38-abi3-win_amd64.whl
Size 522.5 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0ff07bc89e160bd1e31e06aa1d09f8fef420c45b941fb71668f29911bd989665
BLAKE2b-256 checksum
How to use checksums
b3946aefa17df395df5a2dd34f0daa04fe1e69f7985b24e9f62538a89d106abe
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.14-cp38-abi3-win32.whl

Download URL tree_sitter_carve-0.1.14-cp38-abi3-win32.whl
Size 511.7 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
bb0aa00807f73155c5a2670a69fed5747f7f748d1b2ac4685dc6dbba8ac9e56d
BLAKE2b-256 checksum
How to use checksums
640d5c58113cfbeff5f6c6a0d805e33d24aa7cb82c2395bfd7161a20e6bcf4e1
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.14-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_carve-0.1.14-cp38-abi3-musllinux_1_2_x86_64.whl
Size 912.4 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
c1f9fc092aede89ad4c50514da0f68543192e28c8c47dfe1208af67c73c977a8
BLAKE2b-256 checksum
How to use checksums
2ceed11a4d52da4d8328edfaf2806609e53d9ce5e1f87bec1a7f04b12ea8a088
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.14-cp38-abi3-musllinux_1_2_i686.whl

Download URL tree_sitter_carve-0.1.14-cp38-abi3-musllinux_1_2_i686.whl
Size 914.6 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
3e4b3295b72f54153b02602c465c2e90c83f300a6f9aba1e9aef02a8a8df14c7
BLAKE2b-256 checksum
How to use checksums
38fee681409078d0df954310450798106f3141b303386a427435a65244a08898
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.14-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.14-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 932.6 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
09937ced7670d9d29a4ad8d483c1feb073d394372c12c4d2452fbbf09ec79b2c
BLAKE2b-256 checksum
How to use checksums
846a72c6807c47e9f674eb465f6aab9f127874fd56a1cabebfab209c5b1ead63
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.14-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tree_sitter_carve-0.1.14-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 925.0 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
a0d05c70cb6c5c3b7c8edc72af457c629ba9932802f362e29126cc05fd16f505
BLAKE2b-256 checksum
How to use checksums
2bedaf1aebef2af805c3063fd7cd4356ce19e4a800d60ee6a8321a9dd3691537
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.14-cp38-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_carve-0.1.14-cp38-abi3-macosx_11_0_arm64.whl
Size 580.1 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
598ac39ed242cf834bd75015706660c12449d8a481529c15f27e28e7c3abe9ab
BLAKE2b-256 checksum
How to use checksums
d55a54c69b9cc8825223571d48e1ad6e7073181f677162fd41793785c7b7f10b
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.14

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