Better than average syntax highlighting and formatting for emacs.
Go to file
Will Lillis aa1b924997 fix(generate): defer token rewrites until lexical expansion
In a future feature, `RulePool` nodes can be shared between lexical and
syntax roots. No grammars generated by grammar.js/grammra.json are affected
by this issue, as they lead to a tree pool rather than a DAG.

With a DAG `RulePool` representation, however, rewriting tokens during
extraction can destroy a token body before lexical expansion consumes
it and can renumber shared syntax nodes more than once.

Record terminal rewrites while inspecting the original pool, expand tokens
and separators first, then commit the rewrites and renumber each reachable
syntax node once. Resolve grammar metadata against the pending rewrites
before mutating the pool.
2026-08-30 14:23:29 -04:00
.cargo chore: remove CARGO_WORKSPACE_DIR var 2025-09-24 16:14:08 -04:00
.github ci(checks): add lint-toml step using taplo 2026-08-29 11:10:37 +02:00
crates fix(generate): defer token rewrites until lexical expansion 2026-08-30 14:23:29 -04:00
docs docs: add taplo instructions 2026-08-29 11:10:37 +02:00
lib chore: start working on v0.28 2026-08-30 19:50:28 +02:00
test/fixtures chore: start working on v0.28 2026-08-30 19:50:28 +02:00
.editorconfig style(zig): reformat files 2025-08-28 20:54:25 +03:00
.envrc nix: support single-checkout and multi-workspace direnv setups 2026-02-18 00:50:06 -05:00
.gitattributes Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496) 2025-06-06 14:25:37 -07:00
.gitignore refactor: rework nix flake 2025-09-09 03:03:35 -04:00
.taplo.toml fix(toml): drop align_entries = true from .taplo.toml 2026-08-29 11:10:37 +02:00
build.zig build(zig): update to zig 0.16 2026-04-15 14:54:53 +02:00
build.zig.zon chore: start working on v0.28 2026-08-30 19:50:28 +02:00
Cargo.lock chore: start working on v0.28 2026-08-30 19:50:28 +02:00
Cargo.toml chore: start working on v0.28 2026-08-30 19:50:28 +02:00
CMakeLists.txt chore: start working on v0.28 2026-08-30 19:50:28 +02:00
CONTRIBUTING.md docs: improve docs for contributing to docs 2025-01-10 22:57:54 -05:00
flake.lock flake: update lockfile 2026-02-09 22:52:13 -05:00
flake.nix chore: start working on v0.28 2026-08-30 19:50:28 +02:00
FUNDING.json chore: add FUNDING.json 2023-11-08 00:08:07 -05:00
LICENSE chore: copy license to all packages 2025-09-11 03:12:35 -04:00
Makefile chore: start working on v0.28 2026-08-30 19:50:28 +02:00
README.md docs: change WASM/wasm to Wasm 2025-08-21 09:56:32 +03:00

tree-sitter

DOI discord matrix

Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be:

  • General enough to parse any programming language
  • Fast enough to parse on every keystroke in a text editor
  • Robust enough to provide useful results even in the presence of syntax errors
  • Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application