ObserverOfTime
42e2bba8d6
build(bindings): update Makefile
...
Similar to the changes made to the core Makefile.
2025-07-14 11:02:19 +03:00
Antonin Décimo
56c2fe59cb
build(make): cleanup include dir on uninstall
2025-07-14 11:02:19 +03:00
Antonin Décimo
c7f877de96
build(make): invoke ln in the link directory
2025-07-14 11:02:19 +03:00
Antonin Décimo
aa11c198af
ci: don't build the C library with MinGW
...
Only the C compiler is currently installed, without its binutils.
2025-07-14 11:02:19 +03:00
Antonin Décimo
f8f93c1ec1
build(make): fix MinGW builds
...
Rename libtree-sitter.lib target to libtree-sitter.dll.a which is
what MinGW actually uses, move the target after libtree-sitter.dll,
and make sure it is installed to the correct location.
Also avoid invoking `cc -dumpmachine` multiple times.
2025-07-14 11:02:19 +03:00
ObserverOfTime
f04fab9b7a
docs: update bindings list
2025-07-14 10:24:17 +03:00
Will Lillis
854f527f6e
perf: reorder conditional operands
2025-07-13 19:42:30 +02:00
Will Lillis
c740f244ba
fix(generate): propagate node types error
2025-07-13 19:42:30 +02:00
Will Lillis
5ed2c77b59
perf: reorder expensive conditional operand
2025-07-12 13:51:54 -04:00
Will Lillis
ad0f953c21
chore(rust): remove empty grammar_files file
2025-07-10 23:44:10 -04:00
Will Lillis
3c56f53105
fix(test): unwrap result of get_node_types in
...
`test_node_types_deeper_extras` test
2025-07-10 17:42:52 -04:00
WillLillis
d2e06bf130
fix(generate): use topological sort for subtype map
2025-07-10 08:57:55 -04:00
Antonin Delpeuch
36d93aeff3
perf: More efficient computation of used symbols
...
As the call to `symbol_is_used` does not depend
on the production, it is more efficient to call it
only once outside the loop over productions.
I'm not sure if `rustc` is able to do this optimization
on its own (it would need to know that the function
is pure, which sounds difficult in general).
2025-07-09 22:34:53 -04:00
Will Lillis
1e7d77c517
perf: reserve Vec capacities where appropriate
2025-07-09 21:46:25 -04:00
liangmulu
81849352fc
chore: remove redundant words in comment
...
Signed-off-by: liangmulu <liangmulu@outlook.com>
2025-07-09 18:38:37 +02:00
dependabot[bot]
01d8a39c0b
build(deps): bump the cargo group across 1 directory with 3 updates
...
Bumps the cargo group with 3 updates in the / directory: [cc](https://github.com/rust-lang/cc-rs ), [indexmap](https://github.com/indexmap-rs/indexmap ) and [notify](https://github.com/notify-rs/notify ).
Updates `cc` from 1.2.27 to 1.2.29
- [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.27...cc-v1.2.29 )
Updates `indexmap` from 2.9.0 to 2.10.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.9.0...2.10.0 )
Updates `notify` from 8.0.0 to 8.1.0
- [Release notes](https://github.com/notify-rs/notify/releases )
- [Changelog](https://github.com/notify-rs/notify/blob/main/CHANGELOG.md )
- [Commits](https://github.com/notify-rs/notify/compare/notify-8.0.0...notify-8.1.0 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.29
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: indexmap
dependency-version: 2.10.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
- dependency-name: notify
dependency-version: 8.1.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-07-08 11:19:24 +00:00
Antonin Delpeuch
1a3b0375fa
Fix 'extra' field generation for node-types.json
2025-07-07 21:15:09 -04:00
Antonin Delpeuch
59bcffe83b
Add test demonstrating failure to populate 'extra'
...
The test is currently failing, will be fixed by the next commit.
2025-07-07 21:15:09 -04:00
Will Lillis
45318922d8
fix(xtask): run generate crate unit tests
2025-07-06 17:05:21 -04:00
Will Lillis
1a2167b155
fix(ci): run generate crate unit tests
2025-07-06 17:05:21 -04:00
WillLillis
8938309f4b
fix(rust): ignore new nightly lint, correct order of lint list
2025-07-06 12:45:15 -04:00
WillLillis
51a800b7df
fix(docs): don't show mdbook help popup when using code editor
2025-07-01 18:23:38 -04:00
Christian Clason
a6cd6abcfb
ci(nvim-ts): update paths to refactor
...
Problem: After https://github.com/tree-sitter/tree-sitter/pull/4496 , the
crater tests from nvim-treesitter no longer run on PRs with relevant changes.
Solution: Update the paths in the workflows to the new structure.
Also throttle the build step to 10 parallel tasks (reduces flakiness on
Windows).
Also raise the timeout limit to 30 minutes (it's more expensive to have
to restart flaky tests than to let them run).
2025-06-27 16:34:17 +02:00
Veesh Goldman
b09a15eb54
fix(cli): require correct setuptools version
2025-06-27 14:10:30 +02:00
Will Lillis
a9818e4b17
fix(generate): only display conflicting symbol name in non-terminal
...
word token error message if available
2025-06-26 00:55:03 -04:00
Will Lillis
be8b3e282a
fix(rust): remove unused Command import
2025-06-26 00:54:44 -04:00
dependabot[bot]
259e34435f
build(deps): bump brace-expansion in /crates/cli/eslint
...
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion ) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases )
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12 )
---
updated-dependencies:
- dependency-name: brace-expansion
dependency-version: 1.1.12
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-06-23 09:30:13 +02:00
dependabot[bot]
eaa10b279f
build(deps): bump the cargo group with 4 updates
...
Bumps the cargo group with 4 updates: [cc](https://github.com/rust-lang/cc-rs ), [memchr](https://github.com/BurntSushi/memchr ), [webbrowser](https://github.com/amodm/webbrowser-rs ) and [ureq](https://github.com/algesten/ureq ).
Updates `cc` from 1.2.26 to 1.2.27
- [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.26...cc-v1.2.27 )
Updates `memchr` from 2.7.4 to 2.7.5
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.4...2.7.5 )
Updates `webbrowser` from 1.0.4 to 1.0.5
- [Release notes](https://github.com/amodm/webbrowser-rs/releases )
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v1.0.4...v1.0.5 )
Updates `ureq` from 3.0.11 to 3.0.12
- [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md )
- [Commits](https://github.com/algesten/ureq/compare/3.0.11...3.0.12 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.27
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: memchr
dependency-version: 2.7.5
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: webbrowser
dependency-version: 1.0.5
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: ureq
dependency-version: 3.0.12
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-06-17 08:18:16 +00:00
dependabot[bot]
8a15b881fd
build(deps): bump esbuild and tsx in /lib/binding_web
...
Bumps [esbuild](https://github.com/evanw/esbuild ) to 0.25.0 and updates ancestor dependency [tsx](https://github.com/privatenumber/tsx ). These dependencies need to be updated together.
Updates `esbuild` from 0.23.1 to 0.25.0
- [Release notes](https://github.com/evanw/esbuild/releases )
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md )
- [Commits](https://github.com/evanw/esbuild/compare/v0.23.1...v0.25.0 )
Updates `tsx` from 4.19.2 to 4.19.3
- [Release notes](https://github.com/privatenumber/tsx/releases )
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs )
- [Commits](https://github.com/privatenumber/tsx/compare/v4.19.2...v4.19.3 )
---
updated-dependencies:
- dependency-name: esbuild
dependency-version: 0.25.0
dependency-type: indirect
- dependency-name: tsx
dependency-version: 4.19.3
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-06-15 12:48:55 +03:00
Brian Schwind
f475182c7d
fix(playground): initialize tree nodes with a 'plain' class
2025-06-15 12:45:55 +03:00
sammyne
4c51f27b0a
feat(cli): support selecting bindings in init cmd
2025-06-15 12:43:03 +03:00
Tamir Bahar
64760ffa76
fix(web): fix typing for Parser.init
...
Since we're usually only providing `locateFile`, we need the type to be
`Partial<>` to allow it.
This also matches the typing in `@types/emscripten`'s
`EmscriptenModuleFactory` type signature.
2025-06-15 12:41:21 +03:00
Andrew Dupont
02fff92b91
Fix type definitions in exports…
...
…and generate `.d.cts` files for CommonJS exports.
2025-06-15 09:46:05 +03:00
ObserverOfTime
876d5a96bf
chore: use issue types in templates
2025-06-14 11:27:29 +03:00
laur89
e8d3d01598
docs: fix CLI link in readme ( #4514 )
2025-06-13 11:11:44 -07:00
James McCoy
889015f03b
build(rust): use $CARGO_PKG_RUST_VERSION when generating bindings ( #4512 )
...
Since cargo 1.63, $CARGO_PKG_RUST_VERSION is set in the build
environment to the value of the rust-version Cargo.toml field.
This removes the need to manually invoke cargo from build.rs during a
build of the tree-sitter crate with the bindgen feature enabled.
Removing the cargo invocation also ensures the build doesn't write to
the current directory when the target directory has been redirected
elsewhere. "cargo metadata" will attempt to update Cargo.lock, which
will fail if the source tree is read-only.
2025-06-13 11:11:22 -07:00
ObserverOfTime
a2c98b4b5f
fix(loader): fix no-default-features build ( #4505 )
2025-06-11 09:00:54 -07:00
dependabot[bot]
46309a1f95
build(deps): bump the cargo group with 8 updates
...
Bumps the cargo group with 8 updates:
| Package | From | To |
| --- | --- | --- |
| [anstyle](https://github.com/rust-cli/anstyle ) | `1.0.10` | `1.0.11` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.2.25` | `1.2.26` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.39` | `4.5.40` |
| [clap_complete](https://github.com/clap-rs/clap ) | `4.5.52` | `4.5.54` |
| [clap_complete_nushell](https://github.com/clap-rs/clap ) | `4.5.6` | `4.5.7` |
| [flate2](https://github.com/rust-lang/flate2-rs ) | `1.1.1` | `1.1.2` |
| [toml](https://github.com/toml-rs/toml ) | `0.8.22` | `0.8.23` |
| [bindgen](https://github.com/rust-lang/rust-bindgen ) | `0.71.1` | `0.72.0` |
Updates `anstyle` from 1.0.10 to 1.0.11
- [Commits](https://github.com/rust-cli/anstyle/compare/v1.0.10...v1.0.11 )
Updates `cc` from 1.2.25 to 1.2.26
- [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.25...cc-v1.2.26 )
Updates `clap` from 4.5.39 to 4.5.40
- [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.39...clap_complete-v4.5.40 )
Updates `clap_complete` from 4.5.52 to 4.5.54
- [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.52...clap_complete-v4.5.54 )
Updates `clap_complete_nushell` from 4.5.6 to 4.5.7
- [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.6...clap_complete_nushell-v4.5.7 )
Updates `flate2` from 1.1.1 to 1.1.2
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.1.1...1.1.2 )
Updates `toml` from 0.8.22 to 0.8.23
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.22...toml-v0.8.23 )
Updates `bindgen` from 0.71.1 to 0.72.0
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases )
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.71.1...v0.72.0 )
---
updated-dependencies:
- dependency-name: anstyle
dependency-version: 1.0.11
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: cc
dependency-version: 1.2.26
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap
dependency-version: 4.5.40
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete
dependency-version: 4.5.54
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete_nushell
dependency-version: 4.5.7
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: flate2
dependency-version: 1.1.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: toml
dependency-version: 0.8.23
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: bindgen
dependency-version: 0.72.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-06-10 09:10:17 +02:00
Will Lillis
e1f6e38b57
fix(xtask): limit test command to a single thread on windows ( #4489 )
2025-06-08 09:39:55 -07:00
ObserverOfTime
9772270868
fix(bindings): update swift & node dependencies ( #4432 )
...
* fix(bindings): update swift & node dependencies
also add the dependency name to Package.swift
* chore: update config schema
2025-06-07 11:41:07 -07:00
Max Brunsfeld
0fdf569571
Reorganize rust crates into a flat crates directory, simplify some CI steps ( #4496 )
...
* Move all rust crates (except lib) into crates dir, w/o nesting
* Remove stale path from .gitattributes
* Rename lib.rs files for easier navigation
* Rename mod.rs file for easier navigation
* Fix emscripten-version path
* Fix fixtures dir paths
* Use the default rustfmt settings
* Don't use nightly on CI
2025-06-06 14:25:37 -07:00
James McCoy
a6e530b33d
fix(test): remove period in test_flatten_grammar_with_recursive_inline_variable
...
The period was dropped in the `thiserror` refactor
(79444e07f9 ), which caused the
`test_flatten_grammar_with_recursive_inline_variable` test to fail.
Signed-off-by: James McCoy <jamessan@jamessan.com>
2025-06-06 10:35:02 +02:00
Riley Bruins
6cabd9e67f
fix(query)!: assert that predicates end in ! or ?
...
Predicates/directives are documented to end in either `!` or `?`.
However, `query.c` allows them to be any valid identifier, and also
allows `?` or `!` characters anywhere inside an identifier.
This commit removes `?` and `!` from the list of valid identifier
characters, and asserts that predicates/directives only *end* in `?` or
`!`, respectively.
This commit is breaking because you can no longer do something like
`(#eq? @capture foo!bar)` (`foo!bar` must now be quoted).
2025-06-06 10:34:00 +02:00
Will Lillis
ac13c86675
fix(cli): use a generic Into<Path> over single type for path arguments
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2025-06-05 02:41:18 -04:00
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