Will Lillis
50eaf5befd
fix(query): correct expected and actual capture names in query assertions error message
2025-06-05 02:41:18 -04:00
Will Lillis
0220d9d93d
feat(cli): add grammar-path to init, test, version, fuzz,
...
`query`, `highlight` and `tags` subcommands
Allows users to run various commands on a grammar without
being inside the directory for said grammar.
2025-06-05 02:41:18 -04:00
Antonin Delpeuch
88ac3abaa1
docs(highlight): update README with the new way to load languages
2025-06-05 02:41:00 -04:00
Dan Jacka
ad133ecb38
docs: fix indentation & formatting
2025-06-05 01:53:35 -04:00
Thalia Archibald
6ba73fd888
fix(highlight): account for carriage return at EOF and chunk ends
2025-06-05 01:48:01 -04:00
Will Lillis
8bd923ab9e
fix(lib): replace raw array accesses with array_get
2025-06-05 00:53:11 -04:00
Olive Easton
50622f71f8
fix(generate): re-enable default url features
2025-06-04 10:29:59 +02:00
Max Brunsfeld
2ab9c9b590
Fully fix field underflow in go_to_previous_sibling ( #4483 )
...
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-06-02 15:34:25 -07:00
dependabot[bot]
52b719f8fb
build(deps): bump the cargo group with 5 updates
...
Bumps the cargo group with 5 updates:
| Package | From | To |
| --- | --- | --- |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.2.23` | `1.2.25` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.38` | `4.5.39` |
| [clap_complete](https://github.com/clap-rs/clap ) | `4.5.50` | `4.5.52` |
| [clap_complete_nushell](https://github.com/clap-rs/clap ) | `4.5.5` | `4.5.6` |
| [libloading](https://github.com/nagisa/rust_libloading ) | `0.8.7` | `0.8.8` |
Updates `cc` from 1.2.23 to 1.2.25
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.23...cc-v1.2.25 )
Updates `clap` from 4.5.38 to 4.5.39
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.38...clap_complete-v4.5.39 )
Updates `clap_complete` from 4.5.50 to 4.5.52
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.50...clap_complete-v4.5.52 )
Updates `clap_complete_nushell` from 4.5.5 to 4.5.6
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete_nushell-v4.5.5...clap_complete_nushell-v4.5.6 )
Updates `libloading` from 0.8.7 to 0.8.8
- [Commits](https://github.com/nagisa/rust_libloading/commits )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.25
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap
dependency-version: 4.5.39
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete
dependency-version: 4.5.52
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete_nushell
dependency-version: 4.5.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: libloading
dependency-version: 0.8.8
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 23:56:03 +02:00
zyoshoka
135eeded02
docs: update broken link in the playground page
2025-05-31 21:19:20 -04:00
Kai Pastor
0bdf698673
fix(build): pkgconfig and use of GNUInstallDirs ( #4319 )
...
* Fix pkgconfig
Init CMAKE_INSTALL_INCLUDEDIR before pc file generation.
Install pc file to CMAKE_INSTALL_LIBDIR/pkgconfig -
it accompanies the architecture-dependent library.
* Include GNUInstallDirs early
The CMake module initializes variables which are used for
exported information (CMake and pkgconfig).
* Change pc file install destination
2025-05-31 11:45:35 +02:00
Christian Clason
e7f9160867
Revert "feat: add build sha to parser.c header comment" ( #4475 )
...
This reverts commit dc4e232e6e .
Reason: The sha in the generated output (which most distro builds of
tree-sitter, including `cargo install`, strip) produces too many
conflicts when verifying via CI that parsers are regenerated on every
grammar change.
2025-05-29 11:47:06 -07:00
Max Brunsfeld
ca64399f9f
Ignore lock files in grammar repos
...
It is very common practice to ignore
these lock files for libraries, since they do not apply to applications
that use the libraries. The lock files are especially not useful in
tree-sitter grammar repos, since tree-sitter grammars should not have
dependencies. The lock files are just a source of merge conflicts and
spurious CI failures.
2025-05-28 10:58:45 -07:00
sogaiu
19148eaa0d
docs: mention ~ and $HOME for parser-directories
2025-05-28 11:21:09 +02:00
Max Brunsfeld
b8ba76b1ae
Fix hang in npm install script
2025-05-27 17:35:23 -07:00
Max Brunsfeld
f91255a201
Fix crash w/ goto_previous_sibling when parent node has leading extra child ( #4472 )
...
* Fix crash w/ goto_previous_sibling when parent node has leading extra
child Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
* Fix lint
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-05-27 16:56:33 -07:00
Haoxiang Fei
06537fda83
fix: wasi has endian.h
2025-05-24 12:27:13 +02:00
dependabot[bot]
299f8a9fb9
build(deps): bump cc from 1.2.22 to 1.2.23 in the cargo group
...
Bumps the cargo group with 1 update: [cc](https://github.com/rust-lang/cc-rs ).
Updates `cc` from 1.2.22 to 1.2.23
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.22...cc-v1.2.23 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.23
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-05-20 08:07:08 +02:00
Mike Zeller
4339b0fe05
illumos has endian.h
2025-05-15 09:53:45 +02:00
dependabot[bot]
08bb6f44a4
build(deps): bump the cargo group with 6 updates
...
Bumps the cargo group with 6 updates:
| Package | From | To |
| --- | --- | --- |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.2.21` | `1.2.22` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.37` | `4.5.38` |
| [clap_complete](https://github.com/clap-rs/clap ) | `4.5.48` | `4.5.50` |
| [ctrlc](https://github.com/Detegr/rust-ctrlc ) | `3.4.6` | `3.4.7` |
| [libloading](https://github.com/nagisa/rust_libloading ) | `0.8.6` | `0.8.7` |
| [tempfile](https://github.com/Stebalien/tempfile ) | `3.19.1` | `3.20.0` |
Updates `cc` from 1.2.21 to 1.2.22
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.21...cc-v1.2.22 )
Updates `clap` from 4.5.37 to 4.5.38
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.37...clap_complete-v4.5.38 )
Updates `clap_complete` from 4.5.48 to 4.5.50
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.48...clap_complete-v4.5.50 )
Updates `ctrlc` from 3.4.6 to 3.4.7
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases )
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.6...3.4.7 )
Updates `libloading` from 0.8.6 to 0.8.7
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.6...0.8.7 )
Updates `tempfile` from 3.19.1 to 3.20.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.19.1...v3.20.0 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.22
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap
dependency-version: 4.5.38
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete
dependency-version: 4.5.50
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: ctrlc
dependency-version: 3.4.7
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: libloading
dependency-version: 0.8.7
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: tempfile
dependency-version: 3.20.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-05-13 08:12:35 +02:00
Will Lillis
31b9717ca3
fix(lib): return early for empty predicate step slice
2025-05-11 08:57:30 -04:00
dependabot[bot]
52a792384f
build(deps): bump the cargo group with 2 updates
...
Bumps the cargo group with 2 updates: [cc](https://github.com/rust-lang/cc-rs ) and [git2](https://github.com/rust-lang/git2-rs ).
Updates `cc` from 1.2.20 to 1.2.21
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.20...cc-v1.2.21 )
Updates `git2` from 0.20.1 to 0.20.2
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.20.1...git2-0.20.2 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.21
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: git2
dependency-version: 0.20.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-05-06 08:57:38 +00:00
Will Lillis
b1d2b7cfb8
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.
2025-05-03 17:27:37 -04:00
Will Lillis
cc634236b1
fix(rust): address new clippy lint
2025-05-03 19:57:11 +02:00
Will Lillis
91274f47e4
fix(rust): ignore obfuscated_if_else lint
2025-05-03 19:57:11 +02:00
dependabot[bot]
bfc5d1180c
build(deps): bump vite from 6.3.2 to 6.3.4 in /lib/binding_web
...
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 6.3.2 to 6.3.4.
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite )
---
updated-dependencies:
- dependency-name: vite
dependency-version: 6.3.4
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 09:18:47 +02:00
Amaan Qureshi
21c658a12c
fix(lib): do not access the alias sequence for the end subtree in ts_subtree_summarize_children
2025-04-28 23:13:13 -04:00
dependabot[bot]
e057299b0d
build(deps): bump the cargo group with 3 updates
...
Bumps the cargo group with 3 updates: [cc](https://github.com/rust-lang/cc-rs ), [clap_complete](https://github.com/clap-rs/clap ) and [toml](https://github.com/toml-rs/toml ).
Updates `cc` from 1.2.19 to 1.2.20
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.19...cc-v1.2.20 )
Updates `clap_complete` from 4.5.47 to 4.5.48
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.47...clap_complete-v4.5.48 )
Updates `toml` from 0.8.20 to 0.8.22
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.20...toml-v0.8.22 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.20
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete
dependency-version: 4.5.48
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: toml
dependency-version: 0.8.22
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 19:43:22 -04:00
Amaan Qureshi
3056dc5be4
fix(generate): mark url as a Windows-only dependency
2025-04-28 18:31:09 -04:00
Amaan Qureshi
0191e94226
docs(rust): remove adding cc as a build dependency for consumers
2025-04-28 18:30:45 -04:00
Will Lillis
dcdd5bc372
fix(parse): explicitly move temporaries in the logger callback
...
This fixes problems where these stack-local temporaries are used after their scope ends.
2025-04-28 03:30:05 -04:00
Will Lillis
d0e0e0322c
fix(xtask): properly trim emscripten version at the source ( #4402 )
...
* fix(xtask): properly trim emscripten version at the source
* fix(loader): trim emscripten version in `cargo:rustc-env=` print
2025-04-27 20:59:04 -07:00
Max Brunsfeld
ca7ff033db
Fix wasm build issues introduced by switching to wasi-sdk ( #4407 )
...
* Don't shell out for extracting tar.gz files
* Avoid wasi-sdk adding dependency on libc.so
* Clippy
* Fix -nostdlib flag
2025-04-27 19:42:34 -07:00
Max Brunsfeld
d4d8ed32b3
cli: Compile parsers to wasm using wasi-sdk, not emscripten ( #4393 )
...
* Build wasm modules using wasi-sdk, not emscripten
* Log a warning if --docker is passed
2025-04-24 16:00:09 -07:00
Max Brunsfeld
635c49909c
Add zed config file (enable all cargo features for rust-analyzer)
2025-04-23 16:32:21 -07:00
Tamchuk
70cf2a7a22
docs: fix typo
2025-04-23 08:26:51 -04:00
dependabot[bot]
74e6641afc
build(deps): bump the cargo group with 2 updates
...
Bumps the cargo group with 2 updates: [clap](https://github.com/clap-rs/clap ) and [ureq](https://github.com/algesten/ureq ).
Updates `clap` from 4.5.36 to 4.5.37
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.36...clap_complete-v4.5.37 )
Updates `ureq` from 3.0.10 to 3.0.11
- [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md )
- [Commits](https://github.com/algesten/ureq/compare/3.0.10...3.0.11 )
---
updated-dependencies:
- dependency-name: clap
dependency-version: 4.5.37
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: ureq
dependency-version: 3.0.11
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 10:13:43 +02:00
Will Lillis
c7475e4bf3
perf(highlight): use BTreeMap over IndexMap for highlight configs
2025-04-20 05:55:37 -04:00
WillLillis
eee41925aa
fix(ci): increase timeouts for flaky tests
2025-04-19 10:59:09 +02:00
Amaan Qureshi
69d553c82a
style(cli): formatting
2025-04-19 01:15:53 -04:00
dependabot[bot]
043e0c65ec
build(deps): bump vite from 6.1.0 to 6.2.6 in /lib/binding_web
...
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 6.1.0 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite )
---
updated-dependencies:
- dependency-name: vite
dependency-version: 6.2.6
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 23:57:56 -04:00
vemoo
4dffb818e2
feat(web): export wasm files to better support bundling use cases
2025-04-18 23:47:27 -04:00
Daniel Jalkut
4514751803
docs(cli): improve documentation for the edits argument when parsing code
2025-04-18 23:45:52 -04:00
Tamir Bahar
27fa1088b9
fix(web): replace dynamic require with import
2025-04-18 23:40:40 -04:00
MichiRecRoom
853ca46899
docs(rust): improve bindings' crate doc
2025-04-18 22:55:59 -04:00
Riley Bruins
21390af2dd
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()`)
2025-04-18 18:11:42 -04:00
Will Lillis
45a281c962
fix(ci): trigger build_wasm workflow when xtask is modified
2025-04-16 18:06:48 -04:00
Will Lillis
c7c1614278
fix(xtask): trim EMSCRIPTEN_TAG arg to docker command in build-wasm
...
command
2025-04-16 18:06:48 -04:00
dependabot[bot]
c085a772cf
build(deps): bump the cargo group with 4 updates
...
Bumps the cargo group with 4 updates: [anyhow](https://github.com/dtolnay/anyhow ), [bstr](https://github.com/BurntSushi/bstr ), [cc](https://github.com/rust-lang/cc-rs ) and [clap](https://github.com/clap-rs/clap ).
Updates `anyhow` from 1.0.97 to 1.0.98
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.97...1.0.98 )
Updates `bstr` from 1.11.3 to 1.12.0
- [Commits](https://github.com/BurntSushi/bstr/compare/1.11.3...1.12.0 )
Updates `cc` from 1.2.18 to 1.2.19
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.18...cc-v1.2.19 )
Updates `clap` from 4.5.35 to 4.5.36
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.35...clap_complete-v4.5.36 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-version: 1.0.98
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: bstr
dependency-version: 1.12.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
- dependency-name: cc
dependency-version: 1.2.19
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap
dependency-version: 4.5.36
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-04-15 11:38:47 +02:00
Will Lillis
9fdf685dd5
fix(bindings): report wasm store error in rust bindings set_language
2025-04-14 22:15:40 -04:00