Better than average syntax highlighting and formatting for emacs.
Go to file
Will Lillis 01dc3dba18 fix(parser): sort error recovery reductions for deterministic ordering
The `LookaheadIterator` visits symbols in group order for small parse
states, which can produce `reduce_actions` in a different order than the
original linear symbol scan (pre c1379718). Since reductions are applied
sequentially and the last reduction version survives, different orderings
lead to different error recovery outcomes (e.g. losing nodes from ERROR
trees).

Sort the reduce_actions array by symbol (descending) after collection.
The array is typically 1-5 entries, so the insertion sort cost is
negligible and the full optimization speedup is preserved.
2026-03-29 21:36:29 -04:00
.cargo chore: remove CARGO_WORKSPACE_DIR var 2025-09-24 16:14:08 -04:00
.github ci: bump actions/create-github-app-token in the actions group 2026-03-23 23:01:49 +01:00
.zed Add zed config file (enable all cargo features for rust-analyzer) 2025-04-23 16:32:21 -07:00
crates fix(rust): correct various typos 2026-03-28 05:23:10 -04:00
docs fix(docs): correct various typos 2026-03-28 05:23:10 -04:00
lib fix(parser): sort error recovery reductions for deterministic ordering 2026-03-29 21:36:29 -04:00
test/fixtures fix(wasm): when reallocating the last allocated region, properly grow 2026-01-31 18:24:31 -05:00
.dockerignore Add a simple dockerfile for testing 2024-03-18 12:35:10 -07: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 treewide: add taplo config and reformat toml files 2026-02-18 00:59:34 -05:00
build.zig fix(build): define _BSD_SOURCE 2026-01-12 19:41:58 -05:00
build.zig.zon feat: start working on v0.27 2025-12-13 14:14:33 +01:00
Cargo.lock build(deps): bump cc from 1.2.56 to 1.2.57 in the cargo group 2026-03-23 23:02:18 +01:00
Cargo.toml build(deps): bump cc from 1.2.56 to 1.2.57 in the cargo group 2026-03-23 23:02:18 +01:00
CMakeLists.txt fix(build): define _BSD_SOURCE 2026-01-12 19:41:58 -05:00
CONTRIBUTING.md docs: improve docs for contributing to docs 2025-01-10 22:57:54 -05:00
Dockerfile Add a simple dockerfile for testing 2024-03-18 12:35:10 -07:00
flake.lock flake: update lockfile 2026-02-09 22:52:13 -05:00
flake.nix nix: fix clangd not working 2026-02-08 11:09:31 +01: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 make: drop redundant cargo check 2026-02-09 22:52:13 -05:00
Package.swift fix(build): define _BSD_SOURCE 2026-01-12 19:41:58 -05: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