An incremental parsing system for programming tools
An incremental parsing system for programming tools
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:
generate: quadratic range-vector edits in `CharacterSet::remove_intersection`
generate: quadratic scanning when building character sets
generate: quadratic comparisons during lexer state minimization
GCC 15+ disables `-fjump-tables` by default at `-O0`
generate: quadratic memory blowup in auxiliary-symbol tracking
Error recovery repeats the same cycle millions of times on a 14-byte input
Incremental reparse reuses a column-dependent token after its column changed
lib: lexical conflicts can change keyword tokenization
`capture_list_pool_acquire` scans the whole pool for a free list
`TreeCursor::goto_previous_sibling` fails at child index 256, 512, 768, ...