Amaan Qureshi
31f24395b4
feat: move generate logic to its own crate
2024-09-27 17:04:21 -04:00
Amaan Qureshi
90efa34608
chore: clippy fixes
2024-09-27 16:32:48 -04:00
Samuel Tardieu
1aa28e04ee
style(tests): do not use .as_bytes().len() on strings
2024-09-22 20:27:38 -04:00
Ron Panduwana
2bb20fe2fe
feat: allow external scanners to use the logger
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-08-17 14:46:28 -04:00
ObserverOfTime
3950dddfde
fix(rust): fix new clippy warnings
2024-07-28 10:12:32 +03:00
Amaan Qureshi
e553578696
feat: add fuzz subcommand
2024-05-30 23:00:45 -04:00
Amaan Qureshi
627617edb4
refactor(tests): migrate remaining grammar.json tests to grammar.js
2024-04-29 00:01:35 -04:00
Amaan Qureshi
abc7910381
refactor(rust): misc fixes & tidying
2024-04-11 22:35:43 -04:00
Amaan Qureshi
b35efa8f33
style: format imports
2024-04-11 22:35:43 -04:00
Amaan Qureshi
ad07fa8a9e
feat(bindings/rust): expose Parser::included_ranges
2024-03-12 02:29:35 -04:00
Amaan Qureshi
5a4765ca01
style: clippy lints
2024-02-29 02:17:30 -05:00
Amaan Qureshi
d92a7a9690
test: add test case for parse stack merging with incorrect error cost bug
2024-02-28 08:51:28 -05:00
Amaan Qureshi
b40839cd72
style: prefer turbofish syntax where possible
2024-02-19 16:00:50 -05:00
Amaan Qureshi
f526be8061
test: update html tests
2024-02-19 06:36:48 -05:00
dundargoc
c8bd6705cf
chore: clippy
2024-02-06 23:34:14 -05:00
Amaan Qureshi
55afb4efaf
ci: remove unnecessary targets
2024-02-04 04:19:09 -05:00
Amaan Qureshi
9f2dc9d6b5
fix: rework parser.h includes for test grammars and multi-grammar repos
2024-02-02 10:42:39 -05:00
Amaan Qureshi
422e74fbdb
chore: update javascript-relevant tests
2024-02-02 08:58:22 -05:00
Max Brunsfeld
da16cb1459
Introduce language ref-count management C APIs, remove Copy impl for Language in Rust
2023-12-27 14:59:16 -08:00
Max Brunsfeld
d56d1a32ac
Fix test grammar loading in unit test
2023-11-04 12:26:00 -07:00
Max Brunsfeld
f4e2f68f14
Merge branch 'master' into wasm-language
2023-10-27 12:11:43 +01:00
Andrew Hlynskyi
a5a7564818
chore(rust): add error reporting for position funcs
2023-10-05 17:24:01 +03:00
Amaan Qureshi
ef9cabd4b5
fix: update javascript tests and use cpp/javascript master for fixtures
2023-09-20 11:31:53 -04:00
Amaan Qureshi
acef7a3cdf
chore: add tests
2023-08-02 10:47:28 +01:00
Amaan Qureshi
36c6c8aadf
Merge pull request #2423 from amaanq/nonzero-field-id
...
feat!: use `Option<NonZeroU16>` for TSFieldIds
2023-07-27 13:04:34 -04:00
Amaan Qureshi
99366f3b5d
ci(sparc64): increase timeout time
2023-07-27 12:26:25 -04:00
Amaan Qureshi
75e1bcf70a
refactor!: rename proc_macro to avoid conflicts when building std with -Z build-std
2023-07-24 00:44:44 -04:00
Amaan Qureshi
c436897662
test: bump start_time limit for sparc64
2023-07-18 19:07:51 -04:00
Andrew Hlynskyi
0558f1e0bf
test: add retries for all timeout tests
2023-07-16 05:05:36 +03:00
Amaan Qureshi
b192200008
fix: update tests from python grammar changes
2023-07-10 14:40:18 -04:00
Andrew Hlynskyi
85a588b5b0
Fix tests, adapt to tree-sitter-json 40a81c01a40ac48744e0c8ccabbaba1920441199
2023-04-22 12:08:50 +03:00
Andrew Hlynskyi
588549c093
test: run test_parsing_with_a_timeout with 10 retries
2023-03-16 15:17:21 +02:00
Andrew Hlynskyi
ca152a93dd
ci: fix tests
2023-03-14 20:06:31 +02:00
Max Brunsfeld
d47713ee4a
Integrate WASM compilation into the CLI's Loader
2022-11-15 17:14:33 -08:00
Max Brunsfeld
d07f864815
Fix parse error when reusing a node at the end of an included range
2022-11-11 16:34:57 -08:00
Max Brunsfeld
f0177f216e
Use library-configured allocator to free intermediate included ranges
2022-11-07 10:48:32 -08:00
Kian-Meng Ang
b8552ec6c4
Fix typos
2022-06-28 19:57:42 +08:00
Max Brunsfeld
c697ebfb27
Add explicit unit test for error detection lookahead bug
2022-02-26 14:33:09 -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
e78413832b
Restructure test suite's allocation recording so that tests can run in parallel
2021-10-11 17:24:37 -07:00
Andrew Hlynskyi
7f538170bf
fix(parser): count rows in the debug log from 0
2021-07-15 11:47:14 +03:00
Max Brunsfeld
9cb732859f
Update unit test to reflect HTML grammar change
2021-07-12 12:21:10 -07:00
Cameron Forbis
1ea797fbd2
run fmt
2021-06-29 13:59:21 -07:00
Cameron Forbis
ae5340901e
address code review comments
2021-06-29 13:49:43 -07:00
Cameron Forbis
9182ebef86
update set_included_ranges to modify extent if the current position is at the very beginning of the included range
2021-06-17 16:42:25 -07:00
Max Brunsfeld
a40045a419
When editing, properly invalidate trees that depend on get_column
2021-03-11 14:46:13 -08:00
Douglas Creager
a29c8d9264
Move allocation tracking into lib crate
...
We have several test cases defined in the `cli` crate that depend on the
`lib` crate's `allocation-tracking` feature. The implementation of the
actual allocation tracker used to live in the `cli` crate, close to the
test cases that use it. The `allocation-tracking` feature in the `lib`
crate was just used to tell the tree-sitter implementation to expect
that the allocation tracker exists, and to use it.
That pattern meant that we had a circular dependency: `cli` depends on
`lib`, but `lib` required some code that was implemented in `cli`.
That, in turn, caused linker errors — but only when compiling in certain
configurations! [1]
This patch moves all of the allocation tracking implementation into the
`lib` crate, gated on the existing `allocation-tracking` feature, which
fixes the circular dependency.
Note that this patch does **not** fix the fact that feature unification
causes the `lib` crate to be built with the `allocation-tracking`
feature enabled, even though it's not a default. Fixing that depends on
the forthcoming version 2 feature resolver [2], or using the `dev_dep`
workaround [3] in the meantime.
[1] https://github.com/tree-sitter/tree-sitter/issues/919
[2] https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
[3] https://github.com/tree-sitter/tree-sitter/issues/919#issuecomment-777107086
2021-02-23 09:16:37 -05:00
Max Brunsfeld
cb343cad5e
Avoid reusing the root node during incremental parsing
...
Fixes #712
2020-09-23 12:59:27 -07:00
Max Brunsfeld
d0325579ad
Use Arc to avoid use-after-free in threaded cancellation unit test
...
Fixes #579
2020-03-16 14:46:05 -07:00
Max Brunsfeld
7f4828254f
Fix criteria for detecting when an aborted parse is resuming
2020-03-09 11:30:08 -07:00