Commit graph

156 commits

Author SHA1 Message Date
Andrew Hlynskyi
e966c5ad5b fix: use SIGINT instead of stdin for interruption to don't mess up piped commands 2023-05-02 10:43:46 +03:00
Andrew Hlynskyi
d4d5e29c91 feat(lib): ts_query_cursor_set_max_start_depth - use 0 to reset 2023-04-17 11:16:04 +03:00
Joel Spadin
10178ade35 fix: Use / paths when building WASM
Changed the build-wasm command to always use forward slashes in paths,
since using Windows style paths breaks if the build is run with Docker.

Fixes #532
2023-04-07 13:07:45 -05:00
Andrew Hlynskyi
c1f784498f chore: nit picking in internal proc_macro crate 2023-04-04 13:51:10 +03:00
Andrew Hlynskyi
0c49d6745b 0.20.8 - recovered 2023-04-04 12:15:07 +03:00
Andrew Hlynskyi
cc4f932d17 cicd: new workflow 2023-04-04 03:42:16 +03:00
Andrew Hlynskyi
62f8c431ae test: add retry and test_with_seed proc macros 2023-03-16 15:17:21 +02:00
Andrew Hlynskyi
457eb2fe76 Update Cargo.lock 2023-03-15 20:04:50 +02:00
dependabot[bot]
a1388d9be1
Bump webbrowser from 0.5.5 to 0.8.3
Bumps [webbrowser](https://github.com/amodm/webbrowser-rs) from 0.5.5 to 0.8.3.
- [Release notes](https://github.com/amodm/webbrowser-rs/releases)
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.5.5...v0.8.3)

---
updated-dependencies:
- dependency-name: webbrowser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 16:10:11 +00:00
Max Brunsfeld
b1ad55909d 0.20.8 2023-03-13 12:22:10 -07:00
Max Brunsfeld
811bc8256d lib: 0.20.10 2023-03-13 12:21:19 -07:00
Max Brunsfeld
bd63fb2a0d Tweak query tests 2023-02-16 11:59:34 -08:00
Andrew Hlynskyi
c669e5ee15 Fix permanent rebuild triggering in a git worktree due to wrong git branch file path 2022-12-11 19:16:20 +02:00
Max Brunsfeld
b268e412ad 0.20.7 2022-09-02 15:00:47 -07:00
Max Brunsfeld
2be51abcd8 Bump library versions 2022-09-02 15:00:09 -07:00
Max Brunsfeld
01df16ca9f lib: 0.20.8 2022-06-27 15:07:40 -07:00
Max Brunsfeld
db91399ea7 lib: 0.20.7 2022-06-22 16:03:21 -07:00
Max Brunsfeld
ccd6bf554d 0.20.6 2022-03-02 20:50:52 -08:00
Max Brunsfeld
1b2e90f647 libs: 0.20.6 2022-03-02 20:50:29 -08:00
Max Brunsfeld
4b93326898 Don't generate primary states array if it will be unused due to abi version setting 2022-03-02 14:57:59 -08:00
Max Brunsfeld
09d08e8f8b 0.20.5 2022-03-02 14:43:53 -08:00
Max Brunsfeld
fcbef45899 libs: 0.20.5 2022-03-02 14:43:16 -08:00
Max Brunsfeld
9866674cf8
Merge pull request #1660 from alex-pinkus/expanded-regex-support
Expand regex support to include emojis and binary ops
2022-02-24 17:14:23 -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
5ef4ef4e2e lib: 0.20.4 2022-02-04 13:13:21 -08:00
Max Brunsfeld
714bfd47a7 0.20.4 2022-01-23 10:46:04 -08:00
Max Brunsfeld
3ff5c19403 0.20.3 2022-01-21 16:36:45 -08:00
Max Brunsfeld
fab8540508 libs: 0.20.3 2022-01-21 16:35:37 -08:00
Max Brunsfeld
4ee52ee99e 0.20.2 2021-12-31 17:23:08 -08:00
Max Brunsfeld
f010781efa lib: 0.20.2 2021-12-30 16:35:21 -08:00
Max Brunsfeld
622359b400 Simplify allocation-recording in test suite using new ts_set_allocator API 2021-12-30 16:09:07 -08:00
Max Brunsfeld
775ec76908 Update loader dependency in cli 2021-11-21 13:56:22 -08:00
Max Brunsfeld
86b408412c Use serde's derive feature everywhere 2021-11-21 13:39:30 -08:00
Max Brunsfeld
c432739a65 tags: 0.20.1 2021-11-21 13:31:01 -08:00
Max Brunsfeld
062421dece 0.20.1 2021-11-21 12:33:27 -08:00
Max Brunsfeld
42360fc003 Bump library versions to 0.20.1 2021-11-21 12:33:12 -08:00
Max Brunsfeld
f69c4861c3 Add a randomized test for query matching 2021-11-21 11:29:36 -08:00
Amin Yahyaabadi
8a5620ce15 Use serde's derive feature 2021-10-05 02:38:18 -05:00
Paul Gey
f34c13d2a7 Update smallbitvec dependency 2021-08-08 21:45:43 +02:00
Paul Gey
cf69a2c94c Use IndexMap and FxHash for some hot hash maps 2021-08-08 21:45:43 +02:00
Max Brunsfeld
e85a279cf2 0.20.0 2021-06-29 17:18:39 -07:00
Max Brunsfeld
be69777350 libs: 0.20.0 2021-06-29 17:18:22 -07:00
Andrew Hlynskyi
f22d62393b fix(cli): actual Rust binding version in generated Cargo.toml 2021-06-30 00:36:11 +03:00
Douglas Creager
e841fcfa1b cli: Extract CLI configuration into separate crate
This patch adds the `tree-sitter-config` crate, which manages
tree-sitter's configuration file.  This new setup allows different
components to define their own serializable configuration types, instead
of having to create a single monolithic configuration type.  But the
configuration itself is still stored in a single JSON file.

Before, the default location for the configuration file was
`~/.tree-sitter/config.json`.  This patch updates the default location
to follow the XDG Base Directory spec (or other relevant platform-
specific spec).  So on Linux, for instance, the new default location is
`~/.config/tree-sitter/config.json`.  We will look in the new location
_first_, and fall back on reading from the legacy location if we can't
find anything.
2021-06-10 10:21:22 -04:00
Douglas Creager
66c30648c2 rust: Extract runtime language detection into separate crate
This patch adds a new `tree-sitter-loader` crate, which holds the CLI's
logic for finding and building local grammar definitions at runtime.
This allows other command-line tools to use this logic too!
2021-06-09 17:42:30 -04:00
Douglas Creager
d2d01e77e3 cli: Use anyhow and thiserror for errors
This patch updates the CLI to use anyhow and thiserror for error
management.  The main feature that our custom `Error` type was providing
was a _list_ of messages, which would allow us to annotate "lower-level"
errors with more contextual information.  This is exactly what's
provided by anyhow's `Context` trait.

(This is setup work for a future PR that will pull the `config` and
`loader` modules out into separate crates; by using `anyhow` we wouldn't
have to deal with a circular dependency between with the new crates.)
2021-06-09 16:17:23 -04:00
Max Brunsfeld
8d8690538e 0.19.5 2021-05-20 15:02:46 -07:00
Max Brunsfeld
5664b77535 rust: 0.19.5 2021-05-20 14:29:25 -07:00
Amin Yahyaabadi
919eab023f Fix build-wasm on Windows 2021-04-04 19:07:16 -05:00
Max Brunsfeld
810d10fa26 0.19.4 2021-03-18 10:36:05 -07:00