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
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
Amaan Qureshi
e75a36232b
fix(lib): include api.h so ts_set_allocator is visible
2024-02-27 09:21:17 -05:00
Max Brunsfeld
9b485924d6
Fix invalid parse stack recursive merging with mismatched error cost
...
Allowing this invalid merge caused an invariant to be violated
later on during parsing, when handling a later error.
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-26 20:16:21 -05:00
Max Brunsfeld
527848d7c0
Merge pull request #3084 from tree-sitter/no-vendored-wasmtime-headers
...
Remove vendored wasmtime headers
2024-02-26 15:36:10 -08:00
Max Brunsfeld
dfc6d93bae
Rename wasm C sources to avoid conflicts with standard wasm headers
...
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-26 13:08:30 -08:00
Amaan Qureshi
a31f084b1b
fix: ignore unused variables in the array macros
2024-02-26 14:05:16 -05:00
Max Brunsfeld
b40a42ac0f
Remove vendored wasmtime headers
...
When building rust binding, use wasmtime headers provided via cargo
by the wasmtime-c-api crate.
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-26 10:48:58 -08:00
Amaan Qureshi
f1eecf9786
feat: expose the allocator and array header files for external scanners
2024-02-26 09:43:13 -05:00
Amaan Qureshi
068e29c265
build: unify crate versions via workspace
2024-02-24 18:30:04 -05:00
Max Brunsfeld
9301c1e676
Merge pull request #3068 from tree-sitter/load-old-language-via-wasm-crash
...
Fix crash when attempting to load ancient languages via wasm
2024-02-23 12:24:01 -08:00
Max Brunsfeld
8dded3ab60
Fix crash when attempting to load ancient languages via wasm
2024-02-23 11:48:14 -08:00
Amaan Qureshi
037c71c7bd
fix: apply some scan-build suggestions (unused assignment/garbage access)
2024-02-21 15:38:13 -05:00
Amaan Qureshi
a5b7c2a584
fix: publish 0.21.0 to registries
2024-02-21 15:11:37 -05:00
Amaan Qureshi
a996fb322f
build(deps): bump wasmtime to v18.0.1
2024-02-21 03:39:55 -05:00
Max Brunsfeld
f8eead9703
Use published wasmtime crates
2024-02-20 23:06:22 -08:00
Amaan Qureshi
fd91404ab0
style: tidying
2024-02-19 16:00:50 -05:00
Amaan Qureshi
f526be8061
test: update html tests
2024-02-19 06:36:48 -05:00
Matthew Smith
15e6cd1c35
refactor: name anonymous types in api.h
...
Anonymous structs cannot be forward declared. This change names anonymous
types in api.h so that consumers can forward declare them.
2024-02-17 13:55:11 +01:00
Amaan Qureshi
caa451f024
fix: don't log NUL characters
...
Graphviz dot will fail with this character present
2024-02-17 03:24:42 -05:00
Amaan Qureshi
d80d101e34
build: move common Cargo.toml keys into the workspace and inherit them
2024-02-14 14:56:23 -05:00
dependabot[bot]
e8a818d0b9
build(deps): bump wasmtime from v16.0.0 to v17.0.1
...
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime ) from v16.0.0 to v17.0.1.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases )
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md )
- [Commits](6613acd1e4...601e229d7a )
---
updated-dependencies:
- dependency-name: wasmtime
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-02-14 12:59:13 -05:00
Amaan Qureshi
4303ab99c9
fix: properly handle Query.matches when filtering out results
2024-02-13 16:40:05 -05:00
Amaan Qureshi
da0596ba38
chore: remove deprecated query parsing mechanism
2024-02-13 13:35:32 -05:00
Bedis Nbiba
c7ef6de315
docs(web): provide deno usage information
2024-02-11 03:39:38 -05:00
Amaan Qureshi
697e318a6c
fix(wasm): remove C++ mangled symbols
...
No more upstream scanners use C++ so we're going to encourage to prefer
using C instead. It is just much easier to work with overall
2024-02-09 06:58:56 -05:00
dundargoc
ce191e02c5
fix: use correct printf specifiers
2024-02-08 22:46:43 +01:00
Amaan Qureshi
a969fc428c
chore: move dependencies into the workspace and inherit from there
2024-02-08 15:24:09 -05:00
Amaan Qureshi
7980669267
feat: support dot graph output on windows
2024-02-08 15:21:47 -05:00
dundargoc
ff367ebf4c
build: enable -pedantic
...
Co-authored-by: Patrick Thomson <patrickt@github.com>
2024-02-08 16:12:54 +01:00
dundargoc
df1fe842eb
docs: various fixes
...
Closes https://github.com/tree-sitter/tree-sitter/issues/1317 .
Closes https://github.com/tree-sitter/tree-sitter/issues/1752 .
Closes https://github.com/tree-sitter/tree-sitter/issues/2439 .
Co-authored-by: Simon Hengel <sol@typeful.net>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
2024-02-08 00:08:59 +01:00
Thanabodee Charoenpiriyakij
9fb06643f3
docs: fix incorrect Tree::edit example in README.md
2024-02-07 21:24:02 +01:00
Amaan Qureshi
96a440af35
chore(web): add and apply eslint formatting
2024-02-07 12:18:44 -05:00
dundargoc
c8bd6705cf
chore: clippy
2024-02-06 23:34:14 -05:00