An incremental parsing system for programming tools https://tree-sitter.github.io
Find a file
tree-sitter-ci-bot[bot] 3ad1c7d4e1
Fix cases where error recovery could infinite loop (#4257) (#4262)
* Rename corpus test functions to allow easy filtering by language

* Use usize for seed argument

* Avoid retaining useless stack versions when reductions merge

We found this problem when debugging an infinite loop that happened
during error recovery when using the Zig grammar. The large number of
unnecessary paused stack versions were preventing the correct recovery
strategy from being tried.

* Fix leaked lookahead token when reduction results in a merged stack

* Enable running PHP tests in CI

* Fix possible infinite loop during error recovery at EOF

* Account for external scanner state changes when detecting changed ranges in subtrees

(cherry picked from commit 066fd77d39)

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-03-04 15:38:59 -08:00
.cargo feat: add xtasks to assist with bumping crates 2024-02-25 13:40:03 -05:00
.github ci: separate nightly lints to separate job 2025-03-02 23:20:08 +01:00
cli Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
docs docs: correct build steps for WASM files 2025-02-02 02:07:36 -05:00
highlight chore: a few minor lints 2025-01-21 00:57:58 -05:00
lib Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
tags feat(tags): implement Send + Sync for TagsConfiguration 2025-01-21 00:21:35 -05:00
test/fixtures Ignore external tokens that are zero-length and extra (#4213) (#4216) 2025-02-17 17:38:13 -08:00
xtask Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
.dockerignore Add a simple dockerfile for testing 2024-03-18 12:35:10 -07:00
.editorconfig build: add editorconfig 2024-02-11 13:03:58 +01:00
.gitattributes fix: specify eof should be lf for windows cicd 2024-01-25 20:12:36 -05:00
.gitignore feat(web)!: rewrite the library in TypeScript 2025-01-21 12:36:15 -05:00
build.zig build(zig): use build root instead of cwd (#3944) 2024-11-15 12:47:01 +02:00
build.zig.zon 0.25.2 2025-02-17 18:54:23 -08:00
Cargo.lock tree-sitter-language 0.1.5 2025-02-17 19:47:40 -08:00
Cargo.toml 0.25.2 2025-02-17 18:54:23 -08: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
FUNDING.json chore: add FUNDING.json 2023-11-08 00:08:07 -05:00
LICENSE docs(license): update year 2024-03-16 01:15:22 -04:00
Makefile ci: separate nightly lints to separate job 2025-03-02 23:20:08 +01:00
Package.swift build(swift): include all source files 2025-01-06 01:13:04 -05:00
README.md docs: add discord and matrix badges 2024-03-10 11:28:14 -04:00
rustfmt.toml refactor(rust): misc fixes & tidying 2024-04-11 22:35:43 -04: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