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

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.13
File Size Uploaded Provenance Actions
tree_sitter_carve-0.1.13.tar.gz 1.8 MB Without provenance Details for tree_sitter_carve-0.1.13.tar.gz

Built distributions (wheels)

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

Total release size: 6.8 MB

Release files / tree_sitter_carve-0.1.13.tar.gz

Download URL tree_sitter_carve-0.1.13.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
aff3e5db15ef08910da20f985431d21873141c34697317e3d1193f49eca73868
BLAKE2b-256 checksum
How to use checksums
c973cb0b152985d7c355396c97a1f8893788792572f92ed444485e712e37cf58
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.13-cp38-abi3-win_amd64.whl

Download URL tree_sitter_carve-0.1.13-cp38-abi3-win_amd64.whl
Size 503.3 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6f1f90ad530cd5a2cb8b4344cf74ddde4ebd7627c98354a79b50b0b8b05f2e56
BLAKE2b-256 checksum
How to use checksums
c86c5c2a3ef899675b1d72c8013fab08152092521d7aa5c87db5cb8225df4610
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.13-cp38-abi3-win32.whl

Download URL tree_sitter_carve-0.1.13-cp38-abi3-win32.whl
Size 494.0 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
478c8507817283bf01032e555ce8f382465d077d527a0cecd94a04c69e56c692
BLAKE2b-256 checksum
How to use checksums
76108d29720386015a7876ab618f0741ad84932b60a52c9347a9ae5cb9ee0186
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.13-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_carve-0.1.13-cp38-abi3-musllinux_1_2_x86_64.whl
Size 860.1 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
5b148a8fe4ef5272f93766d1859f6d490e15919bffeb3747a12c9d606b26c73d
BLAKE2b-256 checksum
How to use checksums
2126a56d5b9c4fbb05b4d4909d57daa94277ab97c08ef81fe30165322f6a9fca
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.13-cp38-abi3-musllinux_1_2_i686.whl

Download URL tree_sitter_carve-0.1.13-cp38-abi3-musllinux_1_2_i686.whl
Size 861.6 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
64da4975114747528217d02637d725efa9c3380a4a0a71b2297214ed9817a996
BLAKE2b-256 checksum
How to use checksums
01f68437e2db414644efd680ea0041dd1c36edb1acec1c942669138cacf92582
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.13-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.13-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 878.0 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
f13a32c251f2eb3150bed7d97f287ecfc82637adee34c7eb75f05544cf50474e
BLAKE2b-256 checksum
How to use checksums
99d54c8ca5f7764c8f1ff8dd9b67feb82238d4394296c753fbc5c235c1f2d147
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.13-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tree_sitter_carve-0.1.13-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 872.9 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
717c04531b6b94c274fc1a284aaa0f5cd5355d7dea9a475bb34ec7cbd0c0bf67
BLAKE2b-256 checksum
How to use checksums
3b6d17a02df266d948fdc3182d85eb0e90bb9e96fa31d7979a5bf1bd299f98fd
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.13-cp38-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_carve-0.1.13-cp38-abi3-macosx_11_0_arm64.whl
Size 559.5 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
79a35ba26390ee2ac0120a4c91958f937a09344b302ccfcaf6f6a305688872fc
BLAKE2b-256 checksum
How to use checksums
fab42da0f1774f8bca693bf102a16a53c58e24402f4e0e47a62e29224b1f3621
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.13

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