Yuri Astrakhan
b749c02eb5
Mark all format-like macros for Clippy
...
See https://doc.rust-lang.org/nightly/clippy/attribs.html#clippyformat_args
Ensure that usage of the macros with `format!`-like parameters will be validated by Clippy
2025-03-03 02:16:23 -05:00
WillLillis
1fdd1d250c
ci: separate nightly lints to separate job
2025-03-02 16:37:03 -05:00
WillLillis
998fb34d15
fix(test): update expected tree-sitter-rust supertypes
2025-03-02 16:37:03 -05:00
WillLillis
cb30ec5b17
fix(rust): adapt to some new nightly lints
2025-03-02 16:37:03 -05:00
Andrew Dunbar
ab7eb70a3c
typo: but is only works → but it only works ( #4242 )
2025-02-26 09:29:27 -08:00
Will Lillis
3b67861def
fix(wasm): restore passing in ERROR to descendantsOfType ( #4226 )
2025-02-19 14:47:10 -08:00
Max Brunsfeld
b26b7f8d62
Decrease the MSRV for the tree-sitter-language crate ( #4221 )
2025-02-17 18:52:57 -08:00
Max Brunsfeld
2bd400dcee
Reset result_symbol field of lexer in wasm memory in between invocations ( #4218 )
2025-02-17 17:36:46 -08:00
Max Brunsfeld
dedcc5255a
Ignore external tokens that are zero-length and extra ( #4213 )
...
Co-authored-by: Anthony <anthony@zed.dev>
2025-02-17 15:07:44 -08:00
Max Brunsfeld
14b8ead412
Fix crash when loading languages w/ old ABI via wasm ( #4210 )
2025-02-17 13:56:53 -08:00
Antonin Décimo
f0571b1e33
feat: Windows support using MinGW-w64 ( #4201 )
...
Building tree-sitter on Windows within a Cygwin or MSYS2 environment
for MinGW-w64 targets should work. As there's no configure-like step,
the tools have to be specified with:
make CC=x86_64-w64-mingw32-gcc \
AR=x86_64-w64-mingw32-ar \
STRIP=x86_64-w64-mingw32-strip
Useful reference:
[How to build and use DLLs on Windows](https://nullprogram.com/blog/2021/05/31/ )
This commit doesn't tag public functions with dllexport or
dllimport. This results in exporting non-static functions visible
between translation units, and generating slightly less efficient code
for calling exported functions from the DLL.
This commit doesn't include support to build libtree-sitter with MSVC or
clang-cl, but generates a libtree-sitter.lib file for MSVC/clang-cl
consumers.
2025-02-12 16:31:06 -08:00
Amaan Qureshi
8e79929cb8
ci: remove benchmark step
...
We don't actually use this data, it runs without a purpose
2025-02-11 22:56:50 -05:00
Amaan Qureshi
0a33135483
ci: rename web files, and upload a tarball for web-tree-sitter assets
2025-02-11 22:56:50 -05:00
Amaan Qureshi
a40265cbeb
refactor(web): rename tree-sitter.js to web-tree-sitter.js
...
This is not breaking for consumers of the web bindings, nor the
playground as both filenames will be kept in the .github.io repo
2025-02-11 22:56:50 -05:00
Amaan Qureshi
74d7ca8582
fix(rust): adapt to new clippy lints
2025-02-08 13:15:56 -05:00
Amaan Qureshi
1a80a1f413
fix: add generate crate to workspace members
2025-02-08 13:15:56 -05:00
Roberto Huertas
f95e0e3a56
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.
2025-02-08 12:47:17 -05:00
Thomas Klausner
14647b2a38
build: add a comment explaining why we undef _POSIX_C_SOURCE
2025-02-02 17:14:28 -05:00
Thomas Klausner
5311904619
build: fix compilation on NetBSD a different way
2025-02-02 17:14:28 -05:00
Thomas Klausner
60b76c7834
Revert "build: do not define _POSIX_C_SOURCE on NetBSD"
...
This reverts commit 54921453da .
2025-02-02 17:14:28 -05:00
Thomas Klausner
2bf04d1f04
build: do not define _POSIX_C_SOURCE on NetBSD
...
It leads to missing symbols, see #4180 .
2025-02-02 17:14:28 -05: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
Amaan Qureshi
05d443a019
style(rust): correct doc comments
2025-02-02 02:07:36 -05:00
Amaan Qureshi
eed662df98
fix(bindings): correct Zig bindings to expose a language function
...
Instead of having users declare the extern function themselves, they can
pass in the language to `Language.create` in the zig bindings. If they
really want, they can always opt into the `extern fn tree_sitter_LANG()
*const ts.Language` approach.
2025-02-02 02:07:36 -05:00
Riley Bruins
9ad096ef22
fix(lib): prevent finished_tree assertion failure
...
**Problem:** When resetting the parser during subtree balancing, an
error is thrown:
```
parser.c:2198: ts_parser_parse: Assertion `self->finished_tree.ptr' failed.
```
**Solution:** Reset `canceled_balancing` to false in
`ts_parser_reset()`.
2025-02-01 16:19:14 -05:00
Amaan Qureshi
ac8a4ba80e
ci: use ubuntu-22.04 for x64 builds
2025-02-01 14:27:58 -05:00
ObserverOfTime
c2221f2732
feat(cli): specify abi version via env var
2025-02-01 13:57:53 -05:00
Amaan Qureshi
16aaed78ae
build: update authors
2025-01-31 21:11:10 -05:00
Amaan Qureshi
a115e515ff
feat(web): include C source files for debugging
2025-01-31 20:41:11 -05:00
Amaan Qureshi
060e69e671
build(web): relocate source files in WASM sourcemap
2025-01-31 20:41:11 -05:00
Amaan Qureshi
40dfe6bd51
build(web): bump deps
2025-01-31 20:41:11 -05:00
Amaan Qureshi
dc64bb5395
chore: adapt to latest clippy lints
2025-01-31 20:41:11 -05:00
ObserverOfTime
51acdf9723
feat(bindings)!: update swift bindings
2025-01-31 10:16:01 -05:00
ObserverOfTime
1b3a9a4563
chore(bindings): include license file in crate
2025-01-31 16:22:25 +02:00
Amaan Qureshi
304e56850f
chore(web): update type definitions
2025-01-28 20:59:37 -05:00
Amaan Qureshi
9d62f17bc4
fix(web): correct doc comment
2025-01-28 20:59:37 -05:00
ObserverOfTime
032af925fc
build(cli): explicitly include files
2025-01-28 19:30:43 -05:00
Gabriel Holodak
f5e9680b75
fix(cli): propagate error flag in parse summary
2025-01-28 18:17:31 -05:00
Amaan Qureshi
9515be4fc1
fix(web): update check-artifacts script
2025-01-26 14:39:01 -05:00
Amaan Qureshi
2cf18f5ac2
build: bump dependencies
2025-01-26 14:15:01 -05:00
Amaan Qureshi
56a6df0c57
build: bump tree-sitter-language to 0.1.4
2025-01-26 14:15:01 -05:00
Amaan Qureshi
67619dab5c
ci(release): correct build steps for web-tree-sitter
2025-01-26 14:15:01 -05:00
Amaan Qureshi
5546862bb7
fix(web): correct debug file location
2025-01-26 14:15:01 -05:00
Amaan Qureshi
959f096a89
feat(generate): defer to ABI 14 if tree-sitter.json doesn't exist, rather than hard failing
2025-01-26 13:12:58 -05:00
Amaan Qureshi
016dd7afbf
feat(bindings): use cc 1.2 for Rust
2025-01-26 13:12:58 -05:00
Christian Clason
67cc0a9f58
build(deps): bump wasmtime-c-api to v29.0.1
2025-01-26 12:45:15 -05:00
Amaan Qureshi
4940d2c29b
fix(cli): correct traversal behavior for finding error nodes
2025-01-26 01:10:01 -05:00
Amaan Qureshi
4b6723192e
refactor(cli): replace embedded xterm colors file with ansi_colours
2025-01-25 17:20:18 -05:00
Amaan Qureshi
8f3ceb471a
docs: add missing summary element
2025-01-25 14:08:56 -05:00