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

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

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-carve 0.1.10
File
tree_sitter_carve-0.1.10-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
tree_sitter_carve-0.1.10-cp38-abi3-win32.whl CPython 3.8 abi3 Windows x86-32 Details
tree_sitter_carve-0.1.10-cp38-abi3-musllinux_1_2_x86_64.whl CPython 3.8 abi3 Linux musl 1.2+ x86-64 Details
tree_sitter_carve-0.1.10-cp38-abi3-musllinux_1_2_i686.whl CPython 3.8 abi3 Linux musl 1.2+ x86-32 Details
tree_sitter_carve-0.1.10-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
tree_sitter_carve-0.1.10-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.10-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details

Total release size: 6.2 MB

Release files / tree_sitter_carve-0.1.10.tar.gz

Download URL tree_sitter_carve-0.1.10.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
9edcbb23cf61e2a6bd11d19691596decd098c2781390cc0768754fb4cb8a0230
BLAKE2b-256 checksum
How to use checksums
a7a5f5faf5dbad43684439ca13a6700408d940cffc00bda3b3d3d8c7f5a80b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-cp38-abi3-win_amd64.whl

Download URL tree_sitter_carve-0.1.10-cp38-abi3-win_amd64.whl
Size 463.0 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0aec90619d56a1c37e7559ab8d054f97bb723af2f16576e6359cbbc1df310c76
BLAKE2b-256 checksum
How to use checksums
27fac1453025865d821bba0adcb15c19a42c0c44b89d8407c3a75673a341c6bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-cp38-abi3-win32.whl

Download URL tree_sitter_carve-0.1.10-cp38-abi3-win32.whl
Size 460.4 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
26404977ccd8f566fe215586e746b3a7819f86d487b4237e140da150f55cd1b6
BLAKE2b-256 checksum
How to use checksums
e362c2a239c3ace781fe8c8a90ac085b6b8c97b923b379b013bdcd57c631faac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_carve-0.1.10-cp38-abi3-musllinux_1_2_x86_64.whl
Size 752.2 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
6713008893ea16738ad56fdfa3bf2f645b12f30da2da321becb987e2c4c5911a
BLAKE2b-256 checksum
How to use checksums
bc2fbbd07ba140b488f5534140a42e65c2a554cf125c39002f2011b17b13dbf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-cp38-abi3-musllinux_1_2_i686.whl

Download URL tree_sitter_carve-0.1.10-cp38-abi3-musllinux_1_2_i686.whl
Size 751.4 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
fad13a80d3b07e33f2ed0b9fe87525c73f72e27b5a0b3eea2f9ace75423f469d
BLAKE2b-256 checksum
How to use checksums
741b03d0fffda157950e4dcc4c99e8c4a7efdf2bc529f6fe9601e2d1a3bb61a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-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.10-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 764.4 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
697cb8ac85f364668c02038c26350f0f0d8eca9aa992ac7eca7cb8ca6f8fb1cf
BLAKE2b-256 checksum
How to use checksums
52875be402777fd3e07c5452a17fa5b3ae68980cba7ca3f4a58fbe877fb900fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tree_sitter_carve-0.1.10-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 760.3 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
73d935caf467ff514723a38927b314b8a15fffd6b1c045e47f537b4722340f0a
BLAKE2b-256 checksum
How to use checksums
34036ad640901fa9a691828d29aaffa4ff879a1f845a448fe4b395f6a6047b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tree_sitter_carve-0.1.10-cp38-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_carve-0.1.10-cp38-abi3-macosx_11_0_arm64.whl
Size 516.6 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
445383803a27a1a6283a801a9048501442b8fed192add9dbf8638143947f7adf
BLAKE2b-256 checksum
How to use checksums
7801cb9adb983a9ad4aa04acaa353c69fc73a2c29c8ee99ffbef70716311b052
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for tree-sitter-carve 0.1.10

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