Jisuk Byun
4cd23ff6b0
fix(rust): update README example
2024-04-18 13:25:42 -04:00
Adrien Friggeri
01bf431261
fix(wasm): correct childrenFromFieldXXX method signatures
...
These do not expect a `cursor` parameter
2024-04-16 13:48:53 -04:00
Max Brunsfeld
cdd4688860
0.22.5
2024-04-14 10:17:04 -07:00
Mark McCulloh
a7a47d561d
fix(rust): compilation on wasm32-wasi
2024-04-13 18:30:41 -04:00
Max Brunsfeld
285257998c
0.22.4
2024-04-12 17:03:02 -07:00
Max Brunsfeld
a3d338781b
0.22.3
2024-04-12 15:10:49 -07:00
Max Brunsfeld
7ec40b0ab4
Implement single-char state transitions using a static array and for loop
...
This reduces compile time, compared to generating many individual if statements.
2024-04-12 14:40:11 -07:00
Max Brunsfeld
3498498449
Merge branch 'master' into simpler-large-char-set-code
2024-04-12 10:03:46 -07:00
Amaan Qureshi
96d18408a3
refactor(js): misc fixes & tidying
2024-04-11 22:35:43 -04:00
Amaan Qureshi
abc7910381
refactor(rust): misc fixes & tidying
2024-04-11 22:35:43 -04:00
Amaan Qureshi
5825e24d56
style: wrap comments
2024-04-11 22:35:43 -04:00
Amaan Qureshi
b35efa8f33
style: format imports
2024-04-11 22:35:43 -04:00
Max Brunsfeld
be6e6d3708
Merge branch 'master' into simpler-large-char-set-code
2024-04-11 16:03:20 -07:00
ObserverOfTime
818cd8c291
refactor(parser): make REDUCE macro non-variadic
2024-04-11 20:47:08 +03:00
Will Lillis
cbcb51b857
fix: tie the lifetime of the cursor to the query in QueryCursor::captures()
2024-04-09 12:19:06 -04:00
Amaan Qureshi
c1a63019a4
chore: update tests
2024-04-08 17:56:05 -04:00
Torsten Schmits
cdd00defdb
fix(lib): use correct format specifier in log message
2024-04-04 14:51:15 -04:00
WillLillis
a7078a1561
fix: Add lifetime to mactches function
2024-04-03 22:06:19 -04:00
ObserverOfTime
78b6067a5d
fix(parser): fix variadic macro
2024-04-02 03:18:05 -04:00
Max Brunsfeld
39be6972fe
Use static arrays and a fixed binary search for large char set checks
2024-03-29 23:00:48 -07:00
Max Brunsfeld
0fc92c9a7d
Add strncat to wasm stdlib
...
Co-authored-by: Marshall <marshall@zed.dev>
2024-03-25 09:51:54 -07:00
Max Brunsfeld
b7fcf9878e
Upgrade wasmtime
2024-03-20 18:23:44 -07:00
Max Brunsfeld
8945e3a111
Fix sorting of wasm stdlib symbols
2024-03-20 18:23:44 -07:00
Amaan Qureshi
09d2b23a64
fix(lib): account for the root node of a tree cursor being an alias
2024-03-20 19:23:08 -04:00
Amaan Qureshi
24a68697ac
fix(lib): properly account for aliased root nodes and root nodes with
...
children in `ts_subtree_string`
2024-03-20 19:23:08 -04:00
Amaan Qureshi
ab485da756
fix(lib): do not consider childless nodes for ts_node_parent
2024-03-20 19:23:08 -04:00
Max Brunsfeld
f415f0c6f2
Add strncmp to wasm stdlib
2024-03-20 15:49:47 -07:00
Max Brunsfeld
09b18fad5b
Merge pull request #3181 from tree-sitter/handle-wasm-oom
...
When loading languages via WASM, gracefully handle memory errors and leaks in external scanners
2024-03-18 13:15:06 -07:00
Max Brunsfeld
4676cd4200
Defer creation of external scanner until the beginning of parse
2024-03-17 10:20:25 -07:00
Max Brunsfeld
fed9b98d6c
Clean up wasm store construction, avoid hard-coding initial memory size
...
Retrieve the initial memory size from the stdlib's memory import type.
2024-03-17 10:20:18 -07:00
Max Brunsfeld
7a9b3076ef
Handle memory errors occurring in wasm scanners
...
* In WASM, use a custom, simple malloc implementation that lets us
expicitly reset the heap with a new start location.
* When a WASM call traps or errors, propagate that as a parse failure.
* Reset the WASM heap after every parse.
Co-authored-by: Conrad <conrad@zed.dev>
2024-03-17 10:19:42 -07:00
Max Brunsfeld
b19d85aca7
Remove logic for building with clang static analyzer in core rust binding
2024-03-17 09:59:51 -07:00
Amaan Qureshi
fc15f62133
0.22.2
2024-03-17 07:31:58 -04:00
ObserverOfTime
4bbaee2f56
fix(lib): allow hiding symbols
2024-03-17 07:21:06 -04:00
ObserverOfTime
4b12eab927
feat(lib): implement Display for Node
2024-03-17 06:12:28 -04:00
Amaan Qureshi
99b93d83a1
feat(cli)!: add a separate build command to compile parsers
...
This allows users to build parsers without having to run `test` or
`parse` to invoke the compilation process, and allows them to output the
object file to wherever they like. The `build-wasm` command was merged
into this by just specifying the `--wasm` flag.
2024-03-17 05:36:30 -04:00
Amaan Qureshi
30fd71f5ac
fix(lib): avoid possible UB of calling memset on a null ptr when 0 is passed into array_grow_by
2024-03-13 00:02:53 -04:00
Michael Davis
c0185dd635
Lower the lib's MSRV
2024-03-12 09:36:54 -04:00
Amaan Qureshi
5c2f80ebb0
fix(bindings/wasm): fix Parser.getIncludedRanges()
2024-03-12 02:29:35 -04:00
Amaan Qureshi
ad07fa8a9e
feat(bindings/rust): expose Parser::included_ranges
2024-03-12 02:29:35 -04:00
Amaan Qureshi
1c38d34dea
0.22.1
2024-03-10 17:59:12 -04:00
Amaan Qureshi
0a5a564ea7
0.22.0
2024-03-10 17:15:08 -04:00
Amaan Qureshi
728793a160
feat(wasm)!: keep API in-line with upstream and start aligning with node
2024-03-10 03:02:17 -04:00
Boris Verkhovskiy
c070c92722
refactor(wasm)!: make current*, is*, and has* methods properties
2024-03-08 00:27:06 -05:00
Amaan Qureshi
304f8b7c04
fix: don't use __declspec(dllexport) on windows
2024-03-04 13:23:06 -05:00
geekvest
b43e8ce902
docs: remove duplicate the's
...
Signed-off-by: geekvest <cuimoman@sohu.com>
2024-03-03 10:30:21 -05:00
Daumantas Kavolis
ce5afeb4b3
Fix regression in subtree_compare
2024-02-29 10:15:58 +02:00
Amaan Qureshi
5a4765ca01
style: clippy lints
2024-02-29 02:17:30 -05:00
ObserverOfTime
22c85c6139
refactor(array): use pragma GCC in clang too
2024-02-29 01:50:04 -05:00
ObserverOfTime
799833f9cf
build: use c11 everywhere
...
And improve the makefiles
2024-02-27 15:54:38 -05:00