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

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

Built distributions (wheels)

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

Total release size: 6.8 MB

Release files / tree_sitter_carve-0.1.12.tar.gz

Download URL tree_sitter_carve-0.1.12.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
2aaea89c4114d972be4404da1200cc93491555db76f2cfc74c64b0aa4afb5793
BLAKE2b-256 checksum
How to use checksums
1372b8225577c69b3d7489b27a3ef24b5ba17dff7a04f94174ccbb5b5b37b0fe
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.12-cp38-abi3-win_amd64.whl

Download URL tree_sitter_carve-0.1.12-cp38-abi3-win_amd64.whl
Size 497.4 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2ef2b4e6778a81503b146280543187a83750aab959500d528a100938093980a7
BLAKE2b-256 checksum
How to use checksums
75e33242ff31d892c56a7bfc40b6c9d73b62607e374fd4535b1396a0880aad9b
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.12-cp38-abi3-win32.whl

Download URL tree_sitter_carve-0.1.12-cp38-abi3-win32.whl
Size 486.1 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
d1e12a68b67205a7d868d18f4789ee1ec2a8a8798b2fb7ddb25d4115c96762f5
BLAKE2b-256 checksum
How to use checksums
65844a86b2a448d19e9dd83737e2ad76781c013489c1dc0b044009ddde342f14
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.12-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_carve-0.1.12-cp38-abi3-musllinux_1_2_x86_64.whl
Size 853.5 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
a861004d30e97dae680b559b60c6a623ea46c8dffeb6bf168f4d2a598028c97c
BLAKE2b-256 checksum
How to use checksums
ad1984dd176867dcb2c62fcff84a453dae7ad772d2e249f1f0da843f64f1ec19
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.12-cp38-abi3-musllinux_1_2_i686.whl

Download URL tree_sitter_carve-0.1.12-cp38-abi3-musllinux_1_2_i686.whl
Size 855.0 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
ee0c01c32118e31cbf5c9558980de5b0d4ed3905ef4c65be9f5bcd7439e7b3de
BLAKE2b-256 checksum
How to use checksums
6eebd83b38e1d7fdebb2e34a74c3ee4ed3b215a9074283dc15ce4884fcbcde73
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.12-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.12-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 872.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
611e36a5255d2c85502dc659b1c9c6f03f1c938e2c97fdff8b414c798a3ae3ba
BLAKE2b-256 checksum
How to use checksums
5537de3e5805512ff77f82848b11e988edd238dd41d4a933ccb19dbbb9535631
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.12-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tree_sitter_carve-0.1.12-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 866.1 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
c359c08996aa664aea6669891e60a18f46c0442ae304e25a5f0252ad71c92924
BLAKE2b-256 checksum
How to use checksums
62d1ad3455ddf549a78945d2ff656367aeea5e8a20d98d9b06e9b0de9d5cae6e
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.12-cp38-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_carve-0.1.12-cp38-abi3-macosx_11_0_arm64.whl
Size 552.9 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e8b112f2a00e698486563b87b861eeab36962349115759ac376e52fe1e59d348
BLAKE2b-256 checksum
How to use checksums
7f7454a35dc58c418e2851b64afdaeba8c3182f53a0808c4a515a22c1bd0bec4
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.12

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