Repository navigation
Releases
Releases · tree-sitter/tree-sitter
nightly: perf(lib): reuse rotated repetition nodes
When `ts_subtree_compress` rebalances a repetition, it rotates nodes but leaves their parse states alone. A rotated node keeps the state it was pushed in, although it now starts where its new first child does, so it fails the reuse check and every reparse rebuilds it. Give it its first child's parse state instead. That makes rotated nodes reusable, which exposes a rotation that used to be harmless: a node holding a grammar repetition's content (e.g. `seq($._statement, $._terminator)`) passes the existing checks, and rotating it moves part of the content into another node. Only rotate a grandchild that starts with the repetition. Error repeats only group skipped trees, so they're exempt. Reparsing after a one-character edit in an editing session gets 2.5-9x faster: -88% Rust, -83% TypeScript, -75% C, -66% JavaScript, -59% Python.
v0.27.2
What's Changed
- fix(cli): detect corpus parse errors from the tree by @tree-sitter-ci-bot[bot] in #6030
- fix(lib): only match the whole name
ERRORints_language_symbol_for_nameby @tree-sitter-ci-bot[bot] in #6031 - fix(wasm): copy all supertype map entries by @tree-sitter-ci-bot[bot] in #6036
- fix: Windows symbol visibility backport by @WillLillis in #6051
- fix(lib): handle terminal ERROR nodes in
ts_node_has_errorby @tree-sitter-ci-bot[bot] in #6058 - fix(web): various issues by @tree-sitter-ci-bot[bot] in #6059
- fix(lib): reject symbol names with embedded
NULLsuffixes by @tree-sitter-ci-bot[bot] in #6073 - fix(lib): handle large child indices in reverse cursor traversal by @WillLillis in #6075
- fix(rust): address new
unnecessary-box-pinlint by @tree-sitter-ci-bot[bot] in #6089 - fix(generate): preserve reserved-word behavior when merging states by @WillLillis in #6094
- fix(make): don't remove tree-sitter dir on
uninstallby @tree-sitter-ci-bot[bot] in #6098 - backport zig by @clason in #6106
- build(deps): bump wasmtime-c-api to v48.0.8 by @clason in #6107
- release v0.27.2 by @clason in #6108
Full Changelog: v0.27.1...v0.27.2
v0.27.1
What's Changed
- fix: decode UTF-16 surrogate pairs with input endianness by @tree-sitter-ci-bot[bot] in #5913
- fix(cli)!: fix query test capture range matching across lines by @tree-sitter-ci-bot[bot] in #5918
- fix(rust): address new nightly lints by @tree-sitter-ci-bot[bot] in #5921
- fix(generate): resolve token names in debug output by @WillLillis in #5941
- fix(generate): keep GCC jump tables enabled for large lexers by @tree-sitter-ci-bot[bot] in #5985
- fix(generate): exclude external word tokens from keyword extraction by @WillLillis in #5989
- fix(lib): check shifted stack versions during error recovery by @tree-sitter-ci-bot[bot] in #5998
- fix(generate): detect indirect recursion in flattened productions by @WillLillis in #6003
- fix: preserve column dependency when balancing repeat nodes by @tree-sitter-ci-bot[bot] in #6006
- perf(lib): acquire capture lists from a free stack instead of scanning by @tree-sitter-ci-bot[bot] in #6012
- fix(build): don't compile the Wasm stdlib into Emscripten builds by @tree-sitter-ci-bot[bot] in #6015
- fix: various query issues by @tree-sitter-ci-bot[bot] in #6017
- fix(rust): ban
std::fs::canonicalizeby @tree-sitter-ci-bot[bot] in #6018 - fix(bindings): load Node bindings under Bun again by @tree-sitter-ci-bot[bot] in #6021
- release v0.27.1 by @clason in #6024
Full Changelog: v0.27.0...v0.27.1
v0.27.0
What's Changed
- feat: start working on v0.27 by @clason in #5127
- docs(cli): include information on generated files by @clason in #5129
- fix(docs): remove conflicting --release cargo flag in contributing.md by @arkriny in #5132
- fix(cli): trailing whitespace after multiline text nodes in CST by @arkriny in #5133
- ci: bump the actions group with 2 updates by @dependabot[bot] in #5137
- fix(cli): correct discrepancy with cst for
--no-rangesby @WillLillis in #5134 - ci: bump korthout/backport-action from 3 to 4 in the actions group by @dependabot[bot] in #5155
- build(deps): bump the cargo group with 2 updates by @dependabot[bot] in #5154
- Fix Playground Query by @kevin-hua-kraken in #5150
- fix(cli): cst printing improvements by @arkriny in #5161
- docs(cli): better description of files generated by
initby @clason in #5152 - fix(cli): set language in cwd for all usages of
highlightcommand by @WillLillis in #5180 - feat(cli): concurrent builds of the same grammar on different locations on disk by @stackmystack in #5174
- build(deps): bump the cargo group with 2 updates by @dependabot[bot] in #5184
- fix(cli): canonicalize build
--outputpath by @WillLillis in #5183 - feat(cli): make
test --updaterewrite all corpus files by @arkriny in #5179 - build(deps): update rquickjs to 0.11.0 by @clason in #5186
- fix(cli): increase verbosity of
tree-sitter init -uupdates by @WillLillis in #5178 - fix(cli): restore test summary output for
tree-sitter testby @arkriny in #5197 - feat(wasm): add some common used defs to wasm stdlib by @trim21 in #5199
- fix(wasm): update wasm-stdlib.h by @clason in #5209
- build(deps): bump clap from 4.5.53 to 4.5.54 in the cargo group by @dependabot[bot] in #5211
- Fix python free-threading compatibility by @kevmo314 in #5212
- fix(build): define
_BSD_SOURCEby @WillLillis in #5219 - build(deps): bump the cargo group with 3 updates by @dependabot[bot] in #5227
- docs: various updates by @WillLillis in #5228
- fix(docs): appease clippy regarding spacing in README by @WillLillis in #5236
- fix(wasm): regenerate stdlib with wasm-opt by @clason in #5237
- fix: Clarify lifetime parameters; Rust 2018 idioms by @DanikVitek in #5223
- feat: free memory automatically by @theanarkh in #5225
- fix(cli): warn user when
nmcan't be run to verify the symbols inside the parser being built by @WillLillis in #5245 - feat(ci): ensure
wasm-stdlib.his regenerated when wasm stdlib source files are modified by @WillLillis in #5229 - docs(playground): highlight full row for highlighted nodes by @Tam1SH in #5207
- ci: bump actions/github-script from 7 to 8 in the actions group by @dependabot[bot] in #5248
- build(deps): bump cc from 1.2.52 to 1.2.53 in the cargo group by @dependabot[bot] in #5247
- wasm: give binaryen the wasi-sdk treatment by @WillLillis in #5241
- fix(loader): search correct cache directory for wasi-sdk clang by @WillLillis in #5251
- Fix tree-sitter-ruby crate failing to build to Wasm by @kossnocorp in #5158
- fix(wasm): add
iswpunctto stdlib by @clason in #5130 - fix(lib): address strict aliasing violations with
Arraytype by @WillLillis in #5242 - misc Windows fixes by @WillLillis in #5256
- docs: document parser library symbol checks for
buildcommand by @WillLillis in #5258 - build(deps): bump the cargo group with 2 updates by @dependabot[bot] in #5263
- fix(wasm): correct several bugs in
reallocby @WillLillis in #5261 - fix(ci): add wasm-stdlib.h to cache key by @WillLillis in #5266
- fix(generate): error if a supertype is defined as a terminal by @WillLillis in #5267
- Action overflow by @WillLillis in #5273
- fix(wasm): don't wasm-opt twice by @clason in #5253
- build(deps): cargo update by @clason in #5281
- fix(loader): account for nm/ld fix on newer powerpc linux toolchains by @WillLillis in #5268
- wasm: fix
reallocoptimization by @WillLillis in #5276 - fix(cli): use --edits value for fuzz tests by @WillLillis in #5287
- feat(cli): add
--verboseflag tobuildcommand by @WillLillis in #5285 - rust: bump language crate version by @WillLillis in #5291
- fix(rust): place
std::env::set_varinsideunsafeblocks by @WillLillis in #5293 - build(deps): bump bytes from 1.11.0 to 1.11.1 by @dependabot[bot] in #5297
- fix(lib): correct ts_parser_parse docstring by @bertie-wheen in #5295
- fix(test): acquire lock before downloading wasm tools by @WillLillis in #5296
- fix(cli): allow for both debug logs and graphs by @WillLillis in #5306
- lib: clean up strict aliasing fixes in array.h by @amaanq in #5309
- fix(cli): require tree-sitter CLI in CMake template by @WillLillis in #5310
- fix(rust)!: return
u32fromNode::child_countby @WillLillis in #5313 - feat: allow
-in grammar names by @jfly in #5315 - fix(query): prevent cross-branch capture contamination in alternations with quantifiers by @WillLillis in #5317
- web: add default export to CJS bundle by @chadxz in #5305
- ci: speed it up by @amaanq in #5322
- build(deps): bump eslint from 9.11.0 to 9.39.2 in /crates/cli/eslint by @dependabot[bot] in #5283
- build(deps): bump the cargo group with 5 updates by @dependabot[bot] in #5316
- build(deps): bump the cargo group with 4 updates by @dependabot[bot] in #5338
- ci: bump the actions group with 2 updates by @dependabot[bot] in #5339
- rust: edition 2024, MSRV 1.90, lint cleanup, and dep updates by @amaanq in #5326
- feat(highlight)!: utf16 support by @WillLillis in #5324
- use provided by RedoxOS byte orders implementations by @greyshaman in #5342
- build(deps): bump wasmtime to v36.0.5 LTS by @clason in #5350
- fix(generate):
unsafe extern->externin rendered C parser by @WillLillis in #5352 - fix(lib): cast NULL in ts_subtree_children macro by @lucasew in #5343
- ci: add a dry-run workflow to test rust releases by @WillLillis in #5292
- build(deps): bump ajv from 6.12.6 to 6.14.0 in /crates/cli/eslint by @dependabot[bot] in #5355
- build(deps): bump minimatch, eslint and eslint-plugin-jsdoc in /crates/cli/eslint by @dependabot[bot] in #5354
- ci: retrigger crates check on PR updates by @clason in #5357
- cli(init): fix
Package.swiftscanner detection w...
v0.26.13
What's Changed
- fix(query): correctly identify
MISSINGnodes in queries by @tree-sitter-ci-bot[bot] in #5835 - fix(query): correctly set a state's
skipped_quantifierflag when a by @tree-sitter-ci-bot[bot] in #5842 - fix(generate): fold case-insensitive patterns at the AST leaves by @WillLillis in #5854
- fix(parser): avoid wide error nodes on unparseable input by @tree-sitter-ci-bot[bot] in #5855
- fix(ci): run all workspace tests by @WillLillis in #5867
- build(deps): bump wasmtime-c-api to v36.0.14 by @clason in #5870
- fix(rust): remove
must_useattribute fromTree::changed_rangesby @tree-sitter-ci-bot[bot] in #5877 - release v0.26.13 by @clason in #5873
Full Changelog: v0.26.12...v0.26.13
v0.26.12
What's Changed
- fix(generate): fold case-insensitive patterns ourselves by @WillLillis in #5761
- fix(query): keep the trailing anchor when a zero-matched quantifier is anchored on both sides by @tree-sitter-ci-bot[bot] in #5764
- fix(templates): add C source files to Python sdist by @WillLillis in #5765
- fix(init): don't lowercase repository url by @tree-sitter-ci-bot[bot] in #5768
- fix(highlight): use
std::sync::OnceCellfor various loader fields by @WillLillis in #5785 - fix(parser): restart recovery for invalid tokens in the error state by @tree-sitter-ci-bot[bot] in #5792
- Fix associativity resolution with mixed shift precedences by @tree-sitter-ci-bot[bot] in #5796
- fix(parser): fix parsing bug repeat operator by @tree-sitter-ci-bot[bot] in #5829
- release v0.26.12 by @clason in #5831
Full Changelog: v0.26.11...v0.26.12
v0.26.11
What's Changed
- fix(deps): zig manifest for wasmtime is missing windows hashes by @tree-sitter-ci-bot[bot] in #5720
- fix(xtask): eliminate silent errors in zig fetch by @WillLillis in #5724
- fix(query): short-circuit longest-match dedup for disjoint states by @tree-sitter-ci-bot[bot] in #5726
- fix(query): various anchor fixes by @tree-sitter-ci-bot[bot] in #5727
- Fix C++ compilation errors in array macros. by @tree-sitter-ci-bot[bot] in #5735
- fix(rust): address new clippy lints by @WillLillis in #5743
- fix(generate): strip non-ASCII case folds by @tree-sitter-ci-bot[bot] in #5744
- fix(ci): re-set executable permission on release artifacts before zipping by @clason in #5746
- release v0.26.11 by @clason in #5748
Full Changelog: v0.26.10...v0.26.11
v0.26.10
What's Changed
- fix(lib): update doc comment for
ts_parser_parseby @WillLillis in #5642 - fix(lib): use correct TREE_SITTER_HIDE_SYMBOLS macro name in alloc.h by @tree-sitter-ci-bot[bot] in #5643
- fix(cli): improve soundness of cst range calculation by @WillLillis in #5650
- fix(lib): Consider subtree lookahead bytes when determining whether the parser can reuse a node. by @tree-sitter-ci-bot[bot] in #5656
- fix(cli): display warning to user if parser test corpus dir isn't found by @tree-sitter-ci-bot[bot] in #5669
- fix: add DESCRIPTION to grammar Makefile template by @WillLillis in #5672
- fix(cli): infinite loop in highlight test by @WillLillis in #5674
- fix(lib): address strict aliasing violations in
TreeCursortype by @WillLillis in #5693 - build(deps): bump wasmtime-c-api to v36.0.12 by @clason in #5709
- fix(dsl): forbid invalid field names by @WillLillis in #5710
- Fix issues with queries matching a parent node with anchored children (siblings) by @tree-sitter-ci-bot[bot] in #5712
- test(query): regression test for anchored siblings inside a parent by @tree-sitter-ci-bot[bot] in #5716
- release v0.26.10 by @WillLillis in #5717
Full Changelog: v0.26.9...v0.26.10
v0.26.9
What's Changed
- ci(actions): bump actions/cache to v5 by @tree-sitter-ci-bot[bot] in #5482
- build(deps): bump wasmtime-c-api to v36.0.7 by @WillLillis in #5514
- fix(loader): allow filenames with dots by @tree-sitter-ci-bot[bot] in #5538
- fix(rust): fix new clippy lints by @WillLillis in #5539
- test: bump c test fixture to v0.24.2 by @tree-sitter-ci-bot[bot] in #5542
- fix(generate): pass default optimization level in
generate_parser_for_grammarby @tree-sitter-ci-bot[bot] in #5543 - feat(dist): enable install via
cargo binstall(#5533) by @clason in #5544 - Prevent a buffer over-read when parsing 4-byte UTF-16 characters. by @tree-sitter-ci-bot[bot] in #5549
- fix(query): overflow in capture pool ids + some perf by @tree-sitter-ci-bot[bot] in #5555
- docs: note zero point unbounded behavior in query functions by @WillLillis in #5563
- build(deps): bump wasmtime-c-api to v36.0.8 by @clason in #5574
- fix(cli): account for process versions > 5 in the parse command's pretty debug output. by @tree-sitter-ci-bot[bot] in #5577
- fix(generate): improve error message for nonterminals used in immediate token rule by @tree-sitter-ci-bot[bot] in #5583
- fix(generate): rewrite
parse_grammarwith forward DFS by @WillLillis in #5584 - fix(wasm): load supertype tables for ABI 15 grammars by @tree-sitter-ci-bot[bot] in #5606
- build(deps): bump wasmtime-c-api to v36.0.9 by @clason in #5611
- Validate Wasm language memory reads by @tree-sitter-ci-bot[bot] in #5613
- release v0.26.9 by @clason in #5612
Full Changelog: v0.26.8...v0.26.9
v0.26.8
What's Changed
- fix(generate): allow disabling
qjs-rtfeature from CLI by @WillLillis in #5448 - fix(lib): document invariants that must be upheld for
TSInputEditby @WillLillis in #5452 - fix(cli): correct typo in
parsecommand's help text by @WillLillis in #5465 - perf(cli): misc. improvements by @tree-sitter-ci-bot[bot] in #5476
- Fix wasm loading of languages w/ multiple reserved word sets by @tree-sitter-ci-bot[bot] in #5477
- generate: avoid panicking when a supertype only has hidden external token children by @tree-sitter-ci-bot[bot] in #5478
- release v0.26.8 by @clason in #5479
Full Changelog: v0.26.7...v0.26.8