Will Lillis
b0a6bde2fb
fix(lib): return early for empty predicate step slice
...
(cherry picked from commit 31b9717ca3 )
2025-05-11 15:23:39 +02:00
Will Lillis
69723ca40e
fix(query): correct last_child_step_index in cases where a new step
...
wasn't created.
This fixes an OOB access to `self.steps` when a last child anchor
immediately follows a predicate.
(cherry picked from commit b1d2b7cfb8 )
2025-05-04 00:08:10 +02:00
Will Lillis
97131b4a73
fix(rust): address new clippy lint
...
(cherry picked from commit cc634236b1 )
2025-05-03 22:00:55 +02:00
Will Lillis
a3f86b1fa9
fix(rust): ignore obfuscated_if_else lint
...
(cherry picked from commit 91274f47e4 )
2025-05-03 22:00:55 +02:00
Amaan Qureshi
41413e7a71
fix(generate): mark url as a Windows-only dependency
...
(cherry picked from commit 3056dc5be4 )
2025-04-29 09:20:34 +02:00
Amaan Qureshi
d7d0d9fef3
fix(lib): do not access the alias sequence for the end subtree in ts_subtree_summarize_children
...
(cherry picked from commit 21c658a12c )
2025-04-29 09:19:37 +02:00
Will Lillis
a876fff5ba
fix(parse): explicitly move temporaries in the logger callback
...
This fixes problems where these stack-local temporaries are used after their scope ends.
(cherry picked from commit dcdd5bc372 )
2025-04-28 10:12:37 +02:00
Will Lillis
7ddcc7b20b
perf(highlight): use BTreeMap over IndexMap for highlight configs
...
(cherry picked from commit c7475e4bf3 )
2025-04-20 07:30:24 -04:00
Daniel Jalkut
779d613941
docs(cli): improve documentation for the edits argument when parsing code
...
(cherry picked from commit 4514751803 )
2025-04-19 12:22:46 +02:00
Tamir Bahar
0d360a1831
fix(web): replace dynamic require with import
...
(cherry picked from commit 27fa1088b9 )
2025-04-19 12:19:20 +02:00
MichiRecRoom
d44d0f94da
docs(rust): improve bindings' crate doc
...
(cherry picked from commit 853ca46899 )
2025-04-19 12:01:25 +02:00
vemoo
69e857b387
feat(web): export wasm files to better support bundling use cases
...
(cherry picked from commit 4dffb818e2 )
2025-04-19 11:59:23 +02:00
WillLillis
42624511cf
fix(ci): increase timeouts for flaky tests
...
(cherry picked from commit eee41925aa )
2025-04-19 11:37:12 +02:00
Riley Bruins
20a5d46b50
fix(web): correct childWithDescendant() functionality
...
This fix allows for more granular address control when marshalling nodes
across WASM. This is necessary for node methods which accept another
node as a parameter (i.e., `childWithDescendant()`)
(cherry picked from commit 21390af2dd )
2025-04-18 19:13:51 -04:00
Riley Bruins
62cc419262
fix(lib): reset parser options after use
...
**Problem:** After `ts_parser_parse_with_options()`, the parser options
are still stored in the parser object, meaning that a successive call to
`ts_parser_parse()` will actually behave like
`ts_parser_parse_with_options()`, which is not obvious and can have
unintended consequences.
**Solution:** Reset to empty options state after
`ts_parser_parse_with_options()`.
(cherry picked from commit 733d7513af )
2025-04-15 09:37:45 +02:00
Paul Gey
264684d31d
Make highlighting more deterministic when themes are ambiguous
...
(cherry picked from commit b341073192 )
2025-04-11 10:20:43 +02:00
Jon Shea
e295c99eca
fix(rust): clarify error message for non-token reserved words
...
Improve the `NonTokenReservedWord` error message by including the
specific reserved word that was not used as a token.
(cherry picked from commit 92c5d3b8e2 )
2025-04-10 01:10:25 -04:00
Jason Boatman
9fda3e417e
Fix WASI build by not calling a non-existent function. ( #4343 )
...
(cherry picked from commit abc5c6bc50 )
2025-04-08 19:14:46 +02:00
Edgar Onghena
d2914ca243
chore(generate): add @generated to parser.c header ( #4338 )
...
This makes `parser.c` follow the https://generated.at/ convention for generated files. This potentially allows any compatible IDE to discourage editing it directly.
(cherry picked from commit 52d2865365 )
2025-04-08 11:20:25 +02:00
Will Lillis
4619261da0
fix(cli): display "N/A" in parse stats where appropriate when no parsing
...
took place
(cherry picked from commit 0f949168ef )
2025-04-06 17:13:43 +02:00
Will Lillis
14d930d131
fix(highlight): account for multiple rows in highlight testing assertions
...
(cherry picked from commit 71941d8bda )
2025-04-06 17:13:43 +02:00
Amaan Qureshi
ff8bf05def
fix(rust): adapt to new clippy lints
...
(cherry picked from commit 74d7ca8582 )
2025-04-06 16:12:21 +02:00
Amaan Qureshi
150cd12b66
fix: add generate crate to workspace members
...
(cherry picked from commit 1a80a1f413 )
2025-04-06 16:12:21 +02:00
WillLillis
fae24b6da6
fix(rust): address new nightly lint for pointer comparisons
...
(cherry picked from commit 521da2b0a7 )
2025-03-28 09:41:19 +01:00
Simon Willshire
ed69a74463
fix(rust): use core crates for no_std
...
also add `no_std` build to CI
2025-03-25 15:02:14 +01:00
WillLillis
acc9cafc7c
fix(rust): address new clippy lint for pointer comparisons
...
(cherry picked from commit dac6300558 )
2025-03-25 14:11:21 +01:00
Peter Oliver
d25e5d48ea
fix(build): make install shouldn’t fail when a parser bundles no queries ( #4284 )
...
(cherry picked from commit 17471bdfcc )
2025-03-14 10:06:40 +01:00
WillLillis
774eebdf6b
fix(xtask): error if new version supplied to bump-version is less than
...
or equal to current version
(cherry picked from commit 5985690d45 )
2025-03-14 10:06:27 +01:00
WillLillis
979e5ecec0
fix(cli): properly escape invisible characters in parse error output
...
(cherry picked from commit efd212ee46 )
2025-03-12 11:33:28 +01:00
dependabot[bot]
b1a9a827d6
build(deps): bump emscripten to 4.0.4
...
(cherry picked from commit 12aff698b9 )
2025-03-12 10:57:58 +01:00
dependabot[bot]
e413947cc5
build(deps): bump ring from 0.17.8 to 0.17.13
...
Bumps [ring](https://github.com/briansmith/ring ) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md )
- [Commits](https://github.com/briansmith/ring/commits )
---
updated-dependencies:
- dependency-name: ring
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 276accc210 )
2025-03-12 10:57:58 +01:00
WillLillis
c313be63b2
fix(rust): adapt to new nightly lint
...
(cherry picked from commit 11071ed682 )
2025-03-06 18:25:24 -05:00
NOT XVilka
4adcebe284
fix(lib): remove duplicate TSLanguageMetadata typedef ( #4268 )
...
(cherry picked from commit a00fab7dc4 )
2025-03-06 23:48:22 +01:00
Max Brunsfeld
2a835ee029
0.25.3
2025-03-04 16:03:16 -08:00
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
polazarus
b1a7074010
fix(generate): mark TSCharacterRange as static ( #4255 )
...
Problem: Linking different parsers into one executable fails due to duplicate symbols.
Solution: Mark `TSCharacterRange` as `static` when generating parsers.
fixes #4209
(cherry picked from commit 8138dba800 )
2025-03-04 16:52:58 +01:00
tree-sitter-ci-bot[bot]
6f2dbaab5f
build: do not define _POSIX_C_SOURCE on NetBSD ( #4196 )
...
It leads to missing symbols, see #4180 .
(cherry picked from commit 2bf04d1f04 )
---------
Co-authored-by: Thomas Klausner <wiz@gatalith.at>
2025-03-02 23:46:23 +01:00
WillLillis
781dc0570d
ci: separate nightly lints to separate job
...
(cherry picked from commit 1fdd1d250c )
2025-03-02 23:20:08 +01:00
WillLillis
1f64036d87
fix(test): update expected tree-sitter-rust supertypes
...
(cherry picked from commit 998fb34d15 )
2025-03-02 23:20:08 +01:00
WillLillis
4eb46b493f
fix(rust): adapt to some new nightly lints
...
(cherry picked from commit cb30ec5b17 )
2025-03-02 23:20:08 +01:00
Roberto Huertas
d73126d582
fix(web): provide type in the exports
...
When using TypeScript projects using other module settings than CommonJs, the types were not correctly exposed, and the compilation failed.
This adds the types path to the exports so compilation works for `module: NodeNext` and other variants.
(cherry picked from commit f95e0e3a56 )
2025-02-28 19:11:40 +01:00
Will Lillis
637a3e111b
fix(wasm): restore passing in ERROR to descendantsOfType ( #4226 )
...
(cherry picked from commit 3b67861def )
2025-02-20 16:08:19 +01:00
Max Brunsfeld
8b5c63bffa
tree-sitter-language 0.1.5
2025-02-17 19:47:40 -08:00
Max Brunsfeld
6e0618704a
0.25.2
2025-02-17 18:54:23 -08:00
tree-sitter-ci-bot[bot]
64665ec462
Decrease the MSRV for the tree-sitter-language crate ( #4221 ) ( #4222 )
...
(cherry picked from commit b26b7f8d62 )
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-17 18:54:06 -08:00
tree-sitter-ci-bot[bot]
1925a70f7e
Reset result_symbol field of lexer in wasm memory in between invocations ( #4218 ) ( #4220 )
...
(cherry picked from commit 2bd400dcee )
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-17 18:52:32 -08:00
tree-sitter-ci-bot[bot]
02625fc959
Ignore external tokens that are zero-length and extra ( #4213 ) ( #4216 )
...
Co-authored-by: Anthony <anthony@zed.dev>
(cherry picked from commit dedcc5255a )
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-17 17:38:13 -08:00
Max Brunsfeld
d799b78663
Fix crash when loading languages w/ old ABI via wasm ( #4210 )
...
(cherry picked from commit 14b8ead412 )
2025-02-17 23:48:59 +01:00
Amaan Qureshi
f5afe475de
build: bump version to 0.25.1
2025-02-02 02:07:36 -05:00
Amaan Qureshi
f20d4b0897
docs: correct build steps for WASM files
2025-02-02 02:07:36 -05:00