Commit graph

250 commits

Author SHA1 Message Date
Max Brunsfeld
f4e2f68f14 Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
Andrew Hlynskyi
dd52cafdd9 chore: switch fetch-fixtures.cmd to all master branches 2023-09-21 11:28:22 +03:00
Amaan Qureshi
ef9cabd4b5
fix: update javascript tests and use cpp/javascript master for fixtures 2023-09-20 11:31:53 -04:00
Andrew Hlynskyi
9cc1daafca chore(ffi): remove enum name prefixes from all C enum values 2023-09-03 07:38:27 +03:00
Andrew Hlynskyi
abd57bc69b chore: simplify script/generate-bindings 2023-08-21 02:56:14 +03:00
Andrew Hlynskyi
759af6d0a4 Remove Copy, Clone from TSLookaheadIterator raw binding struct 2023-08-02 00:04:17 +03:00
Amaan Qureshi
f9e5696bcb
ci: rework fuzzer script 2023-07-24 00:44:44 -04:00
Andrew Hlynskyi
b52d9313dd chore: script/test - fix usage, remove trial mention, deleted in 7170ec7c 2023-07-16 19:50:13 +03:00
Andrew Hlynskyi
45aede8bf5 script/generate-bindings - protect from using old incompatible bindgen versions 2023-07-14 00:19:23 +03:00
Andrew Hlynskyi
a2bcc4f448 script/generate-bindings - no derived Copy, Clone for ptr data wrappers 2023-07-14 00:19:23 +03:00
Andrew Hlynskyi
f01c4f8376 Restore Rust bindings generation with newer bindgen 0.65.1 2023-07-13 17:34:32 +03:00
Max Brunsfeld
a2119cb691 Add APIs for retrieving tree cursor's depth and descendant index 2023-06-12 11:50:44 -07:00
Andrew Hlynskyi
a9dfcb9e47 script/build-wasm: update emcc options to use actual non-deprecated names 2023-05-16 04:46:46 +03:00
Andrew Hlynskyi
be179a3c80 script/build-wasm: add a --verbose option 2023-05-15 17:03:24 +03:00
Andrew Hlynskyi
09fe5f29d9 fix(test): stick tree-sitter-cpp fixture grammar to a specific hash
It's needed to fix tests fail: https://github.com/tree-sitter/tree-sitter-cpp/pull/202#issuecomment-1546279646

See CLI xtask notes in https://github.com/tree-sitter/tree-sitter/issues/1223
2023-05-13 18:57:42 +03:00
Andrew Hlynskyi
cc6596be82 chore(bindgen): update bindgen to 0.65.1 and regenerate bindings 2023-04-17 11:24:05 +03:00
Andrew Hlynskyi
c38f78345e binding(rust): update script/generate-bindings to use latest rust-bindgen 0.64.0 version 2023-04-04 22:16:27 +03:00
Andrew Hlynskyi
cc4f932d17 cicd: new workflow 2023-04-04 03:42:16 +03:00
Max Brunsfeld
97fd990822 Add --dot flag to parse subcommand, for printing tree as DOT graph 2023-02-13 12:33:34 -08:00
Boris Verkhovskiy
61b85b2664 Make error message more specific 2023-01-08 08:10:14 -07:00
Max Brunsfeld
98ccfcffb0 Provide minimal C/C++ std library to wasm external scanners 2022-11-15 17:14:33 -08:00
Max Brunsfeld
d47713ee4a Integrate WASM compilation into the CLI's Loader 2022-11-15 17:14:33 -08:00
Max Brunsfeld
3f1a7f9cd4 Start work on ability to load wasm languages from native lib, via wasmtime 2022-11-15 17:14:33 -08:00
Jonathan Arnett
a8988339c3 Add 'stringToUTF16' and 'AsciiToString' to exported method 2022-11-15 16:39:17 -08:00
Max Brunsfeld
15190a497d Build core wasm library with C++ exceptions disabled 2022-09-02 14:55:50 -07:00
Kian-Meng Ang
b8552ec6c4 Fix typos 2022-06-28 19:57:42 +08:00
Max Brunsfeld
be463c7789 Update test script with flags for new randomized test options 2022-06-24 14:24:21 -07:00
Max Brunsfeld
7170ec7c96 Improve randomized testing setup
* Allow iterations to be specified via an env var
* Randomly decide the edit count, with a maximum
  specified via an env var.
* Instead of separate env vars for starting seed + trial, just accept a seed
* Remove some noisy output
2022-03-02 17:12:25 -08:00
Alex Pinkus
8fadf18655 Expand regex support to include emojis and binary ops
The `Emoji` property alias is already present, but the actual property
is not available since it lives in a new file. This adds that file to
the `generate-unicode-categories-json`.

The `emoji-data` file follows the same format as the ones we already
consume in `generate-unicode-categories-json`, so adding emoji support
is fairly easy. his, grammars would need to hard-code a set of
unicode ranges in their own regex. The Javascript library `emoji-regex`
cannot be used because of #451.

For unclear reasons, the characters #, *, and 0-9 are marked as
`Emoji=Yes` by `emoji-data.txt`. Because of this, a grammar that wishes
to use emojis is likely to want to exclude those characters. For that
reason, this change also adds support for binary operations in regexes,
e.g. `[\p{Emoji}&&[^#*0-9]]`.

Lastly (and perhaps controversially), this change introduces new
variables available at grammar compile time, for the major, minor, and
patch versions of the tree-sitter CLI used to compile the grammar. This
will allow grammars to conditionally adopt these new regex features
while remaining backward compatible with older versions of the CLI.
Without this part of the change, grammar authors who do not precompile
and check-in their `grammar.json` would need to wait for downstream
systems to adopt a newer tree-sitter CLI version before they could begin
to use these features.
2022-02-19 11:41:36 -08:00
Max Brunsfeld
516fd6f6de Add --abi flag to generate command, generate version 13 by default 2022-01-17 14:50:47 -08:00
Max Brunsfeld
8de8c64c95 Remove unnecessary types from binding.rs 2021-12-09 21:02:15 -08:00
Max Brunsfeld
e78413832b Restructure test suite's allocation recording so that tests can run in parallel 2021-10-11 17:24:37 -07:00
Razze
956705a23d Update to unicode standard 14 2021-10-10 16:40:31 +02:00
Max Brunsfeld
4d64c2b939 Put emscripten-version file in cli directory
This lets the CLI crate build without relying on sibling directories.
2021-09-03 13:57:45 -07:00
FnControlOption
e030434ca7 Handle aliases in unicode property escapes in regexes 2021-08-18 22:22:46 -07:00
Vladimir Panteleev
b14ea51e3d
Refactor emscripten/emsdk version to a single file 2021-06-29 21:39:12 +00:00
Vladimir Panteleev
725f3f7f2b
Pin emscripten/emsdk Docker version
Fixes issues caused by incompatible changes in Emscripten since the
time that tree-sitter was built.
2021-06-26 18:07:12 +00:00
Max Brunsfeld
036aceed57 In script/generate-bindings, add flags for latest bindgen 2021-05-25 18:02:39 -07:00
Max Brunsfeld
8e894ff3f1 Add --no-bindings flag to generate subcommand 2021-03-08 12:01:45 -08:00
Max Brunsfeld
dd4cba2625 Allow symbols to be used in precedence lists 2021-03-03 13:11:05 -08:00
Max Brunsfeld
9d9eb2234f
Merge pull request #906 from tree-sitter/unicode-property-escapes
Handle simple unicode property escapes in regexes
2021-02-17 16:14:42 -08:00
Max Brunsfeld
894357d1d1 In version script, add 'v' prefix to version tags 2021-02-11 16:16:19 -08:00
Max Brunsfeld
242ad90770 Only build the CLI crate when running benchmarks 2021-02-05 11:57:34 -08:00
Max Brunsfeld
e3ba701344 Start work on handling unicode property escapes in regexes 2021-01-29 16:37:45 -08:00
Max Brunsfeld
6c8a928253 Avoid always specifying a --target flag in test script 2020-12-02 15:35:28 -08:00
Max Brunsfeld
b661050a61 Simplify setup for enabling/disabling allocation recording in the C lib 2020-12-02 15:35:13 -08:00
Max Brunsfeld
2699c01ab1 Use latest emscripten on CI 2020-12-01 11:04:06 -08:00
Max Brunsfeld
18980b7b99 wasm: Avoid registering uncaught exception/rejection handlers 2020-12-01 11:04:06 -08:00
Max Brunsfeld
751ffd2ee1 Use new emscripten when building with docker 2020-12-01 11:04:06 -08:00
Max Brunsfeld
b118e7d750 Make binding.js syntactically valid
Put the end of the surrounding closure into a separate file, suffix.js.
2020-11-30 15:28:26 -08:00