Commit graph

1239 commits

Author SHA1 Message Date
Amaan Qureshi
21c06101aa fix(bindings): remove required platforms for swift 2024-04-08 17:56:05 -04:00
Amaan Qureshi
0d2dea9e0e fix(test): allow colons in test names 2024-04-08 17:56:05 -04:00
Amaan Qureshi
a9172e0caa fix: add a semicolon after SKIP macros 2024-04-08 17:56:05 -04:00
Amaan Qureshi
abed43a169 chore: clippy fix 2024-04-08 17:56:05 -04:00
ObserverOfTime
78b6067a5d fix(parser): fix variadic macro 2024-04-02 03:18:05 -04:00
Amaan Qureshi
62cd13a3de test: add regression test for node parent + string bug 2024-03-20 19:23:08 -04: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
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
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
e8dbe011d3 test: fix header writes 2024-03-17 05:36:30 -04:00
Amaan Qureshi
754aa62e89 chore: turbofish styling 2024-03-17 05:36:30 -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
ObserverOfTime
1ff40f5571 fix(lib): makefile installation 2024-03-12 18:14:58 -04:00
Amaan Qureshi
81d90c7cd8 fix(lib): makefile installation on macOS 2024-03-12 15:53:31 -04:00
Max Brunsfeld
2ff746742f
Merge pull request #3172 from tree-sitter/remove-which-crate
Remove dependency on which crate
2024-03-12 12:38:48 -07:00
Max Brunsfeld
99a720c968 Remove dependency on which crate 2024-03-12 12:19:27 -07: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
cdc9fbb240
fix: cli build script behavior on release 2024-03-10 17:53:35 -04:00
Amaan Qureshi
0a5a564ea7
0.22.0 2024-03-10 17:15:08 -04:00
ObserverOfTime
e9b3f65ceb fix(bindings): fix template oversights 2024-03-10 15:48:23 -04:00
Christopher Durham
78cc77e7b2 refactor!: remove redundant escape regex & curly brace regex preprocessing
The regex-syntax crate now natively supports literal escapes for all
ASCII characters except those in [0-9A-Za-z<>].
2024-03-10 14:47:11 -04:00
ObserverOfTime
b60b2489aa feat(bindings): remove dsl types file 2024-03-10 10:06:17 -04:00
ObserverOfTime
072865e450 feat(bindings): add prebuildify to node
Co-Authored-By: Amaan Qureshi <amaanq12@gmail.com>
2024-03-10 10:06:17 -04:00
ObserverOfTime
69cf13bc05 feat(bindings): add peerDependencies for npm 2024-03-10 10:06:17 -04:00
Amaan Qureshi
17e50c4c57 fix: allow the regex v flag 2024-03-10 09:50:29 -04:00
Amaan Qureshi
2e56e94648 build: remove unused deps, bump deps, and bump MSRV to 1.74.1 2024-03-10 09:47:39 -04:00
Amaan Qureshi
4b578a3649 fix(generate): camel case name in Cargo.toml description 2024-03-06 19:53:51 -05:00
ObserverOfTime
2d652c90a7 fix(cli): only output the sources with --no-bindings 2024-03-06 13:56:40 -05:00
Amaan Qureshi
92675117a6 fix(generate): extern allocator functions for the template don't need to be "exported" 2024-03-05 11:19:06 -05:00
Amaan Qureshi
54a31069af fix: parsers should export the language function on windows 2024-03-05 11:19:06 -05:00
Amaan Qureshi
304f8b7c04 fix: don't use __declspec(dllexport) on windows 2024-03-04 13:23:06 -05:00
Amaan Qureshi
f8c41f74f8 fix(bindings): insert types after main if it exists 2024-03-03 11:17:30 -05:00
Amaan Qureshi
57d01335c0 chore: delete binding_files.rs 2024-03-03 10:46:37 -05:00
Amaan Qureshi
27f52266ac feat: replace nan with node-addon-api and conditionally print logs 2024-03-03 10:46:37 -05:00
Segev Finer
30bb44f48a feat: add typings for the node bindings
Fixes #3072
2024-03-03 10:46:37 -05:00
geekvest
b43e8ce902
docs: remove duplicate the's
Signed-off-by: geekvest <cuimoman@sohu.com>
2024-03-03 10:30:21 -05:00
Segev Finer
1dd35fe0e0
feat(node): type tag the language
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2024-03-02 20:59:20 -05:00
ObserverOfTime
924c2b4425 chore(bindings): ignore more artifacts 2024-03-02 20:13:39 -05:00
ObserverOfTime
f7c6dcadaa feat(bindings): add more make targets 2024-03-02 20:13:39 -05:00
Amaan Qureshi
c66ed6a141
fix: and binding.gyp... 2024-03-01 11:02:33 -05:00
Amaan Qureshi
274d0cda0a fix: binding.cc overwrite should replace PARSER_NAME 2024-03-01 10:59:25 -05:00
Amaan Qureshi
6b2879144f build(deps): bump deps & lockfile 2024-02-29 02:17:30 -05:00
Amaan Qureshi
5a4765ca01 style: clippy lints 2024-02-29 02:17:30 -05:00
Amaan Qureshi
60a935139b refactor!: remove top-level corpus dir for tests
It's confusing to have tests in two different top-level directories when working between different grammars, and most of them use `test/corpus` which is more fitting, so time to go.
2024-02-29 02:17:30 -05:00
Amaan Qureshi
4ff33e81bb fix(assertions): case shouldn't matter for comment node detection 2024-02-29 02:17:30 -05:00
Amaan Qureshi
8c4861c186 feat(test): add attributes for corpus tests 2024-02-29 02:17:30 -05:00