Skip to main content

tree-sitter-carve

Tree-sitter grammar for Carve, a post-Markdown lightweight markup language with visual mnemonics.

This grammar is built from the proven Djot Tree-sitter scanner architecture and changes the public syntax to Carve:

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

Development

git clone --recurse-submodules https://github.com/markup-carve/tree-sitter-carve
npm install
npm run generate
npm test

If you cloned without --recurse-submodules, fetch the shared spec corpus with git submodule update --init.

Shared-corpus conformance

The canonical Carve spec corpus is vendored as a git submodule at spec/ (spec/tests/corpus/NN-slug.crv). Two checks run it against this grammar:

npm run test:coverage    # every spec category is classified (covered or skip)
npm run test:conformance # every covered category parses with no ERROR/MISSING
npm run test:corpus      # both, in order

test/coverage.json is the coverage matrix. A category is covered when the grammar parses every one of its corpus inputs cleanly; otherwise it is listed in skip with a reason recording the unmodeled construct. Adding a new spec category (after bumping the submodule) fails test:coverage until it is classified, which is intentional: it forces a decision rather than silently dropping coverage.

Status

Initial grammar. It is intended for editor support and structural parsing. The Carve conformance corpus remains the source of truth for renderer behavior.

Metadata

Release files for tree-sitter-carve 0.1.4

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.4
File Size Uploaded
tree_sitter_carve-0.1.4.tar.gz 584.2 kB Details

Built distributions (wheels)

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

Total release size: 2.1 MB

Release files / tree_sitter_carve-0.1.4.tar.gz

Download URL tree_sitter_carve-0.1.4.tar.gz
Size 584.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9220c90881dfdfe56a3b4b6356b04df9887667a8863f965bcf27e0de86e3154f
BLAKE2b-256 checksum
How to use checksums
78c4051ae35d71899dbcb9bafb604a598d578d5531a0cb12a30d9396026f8d8d
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.4-cp38-abi3-win_amd64.whl

Download URL tree_sitter_carve-0.1.4-cp38-abi3-win_amd64.whl
Size 159.0 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2af164607a54ba3fd797300632f1eb31f3219a8d92b2d429373c9ff13b4abca7
BLAKE2b-256 checksum
How to use checksums
ffcbe64825fa1df6d43d1698ab24d2938a96bdde10caa738ff60e013c4607480
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.4-cp38-abi3-win32.whl

Download URL tree_sitter_carve-0.1.4-cp38-abi3-win32.whl
Size 160.0 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
f8deb1b425680796160fccbf998b517c8780e95382c2d5b44af34fb85c161cee
BLAKE2b-256 checksum
How to use checksums
f115bb13790704f653fd06cfa629e18b5cc8b54afe47a552f537a3648a1bd337
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.4-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_carve-0.1.4-cp38-abi3-musllinux_1_2_x86_64.whl
Size 258.6 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
ffc2605ef2750372ca5ba6160bd852d7cb911f2ea86c6b6f87349469fa896db2
BLAKE2b-256 checksum
How to use checksums
6b757bd2fb8c765f04438f3aa7058ff311996678748e7e620c3607ae77d9b1fc
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.4-cp38-abi3-musllinux_1_2_i686.whl

Download URL tree_sitter_carve-0.1.4-cp38-abi3-musllinux_1_2_i686.whl
Size 260.3 kB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
76d05d4e5444421ecc00445da7814064fff670d22b1922944fafb9536b00a0c9
BLAKE2b-256 checksum
How to use checksums
ad97a7d94abbe1dca03428655d920a73a358921a298c752ddf849a197ee39c1e
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.4-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.4-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 267.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
56b1ddd977d7fe51eca1ea0dd40623aad19382766501a9052e5728078a1fb6a2
BLAKE2b-256 checksum
How to use checksums
e86dcc9b01590542cbc41719915ec0b39f217e859057433e2a4e78a3cb7f95a9
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.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tree_sitter_carve-0.1.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 263.7 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
8d07b9cc470d61f8ae5c518a6f3833aecd26f0da8121477410c37d1f8f1c090f
BLAKE2b-256 checksum
How to use checksums
faa86c7c5cfdb60e8c43858d6c26da8ac6e4b19bacec3e67328dedd877d9e616
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.4-cp38-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_carve-0.1.4-cp38-abi3-macosx_11_0_arm64.whl
Size 169.3 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
26cfd4790f91d81044d4d8a5d67892b2764b78ad8116bf8eab3165c2f1f31e50
BLAKE2b-256 checksum
How to use checksums
765241c34a8f4c3c371ae8394c946b71424ab07973fbc2e52adae70518a74477
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.1.9

8 release files

0.1.8

8 release files

0.1.7

8 release files

0.1.6

8 release files

0.1.5

8 release files

This release

0.1.4 This release

8 release files

0.1.3

8 release files

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