Commit graph

382 commits

Author SHA1 Message Date
Andrew Hlynskyi
08ac19086b chore: simplify test case after query state improvements 2023-09-02 23:12:28 +03:00
Andrew Hlynskyi
52f7eaff31 chore(rust): make Query extra predicates state fully immutable 2023-09-02 23:12:28 +03:00
Amaan Qureshi
dc5ec1cf53
refactor: remove &Option<T> where used 2023-09-01 17:23:39 -04:00
Amaan Qureshi
c5cb27e522
docs: improve predicate docs 2023-08-31 16:01:37 -04:00
Amaan Qureshi
09ac28c77d
feat!: properly handle predicates used on quantified captures 2023-08-31 16:01:36 -04:00
Andrew Hlynskyi
cbce87dab1 chore: add an extra notes for hang tests 2023-08-28 14:16:36 +03:00
Andrew Hlynskyi
a9c4965dd6 cicd: exclude hang tests for exotic arches and ASAN 2023-08-28 05:39:57 +03:00
Andrew Hlynskyi
b205a1f5a2 Run parser hang test in a killable subprocess 2023-08-27 21:00:26 +03:00
Amaan Qureshi
a4ea4737ac fix: do not increment current_included_range_index past included_range_count in __do_advance 2023-08-27 14:16:18 +03:00
Amaan Qureshi
1dbb986515 chore: add a test for an aliased anonymous symbol with flags 2023-08-23 16:55:12 +03:00
Amaan Qureshi
e3a5863287
feat: add @injection.parent to inject an injection's node with the parent language 2023-08-21 01:08:17 -04:00
Andrew Hlynskyi
ffae7d6115 fix: mark helper Rust funcs that receive raw pointers as unsafe 2023-08-20 02:12:51 +03:00
Amaan Qureshi
ac579be788
fix(safety): mark functions that potentially deref a raw pointer as unsafe 2023-08-19 18:59:11 -04:00
Amaan Qureshi
45313e0dfb
feat: add injection.self to inject a node with itself 2023-08-18 18:37:57 -04:00
Amaan Qureshi
458b5de0fc
feat: add any-of predicate 2023-08-17 22:20:57 -04:00
Amaan Qureshi
8eb92d1c64
feat: add an --apply-all-captures argument to highlight & test 2023-08-17 22:20:57 -04:00
Andrew Hlynskyi
6616d7deeb Change edit dumps format and add indexes for all corpus tests
The new dumped edits format is `edit.<SEED>.<TEST_INDEX>.<SEED_INDEX>.<TEST_NAME>`

To cleanup edits:
- Instead of the standard:
    > rm target/scratch/edit.*

- Use the following shell command:
    > find target/scratch/ -name 'edit.*' -delete
2023-08-18 00:02:21 +03:00
Andrew Hlynskyi
caaa533b8d test: add TREE_SITTER_DUMP_EDITS env var to dump corpus edits
It dumps edits to the `target/scratch` folder in a format like `<SEED>.edit`
2023-08-17 20:55:28 +03:00
Andrew Hlynskyi
0dd85c8452 Add TREE_SITTER_GRAMMAR_DEBUG env var to use debug grammars in tests 2023-08-17 18:16:41 +03:00
Jake Sarjeant
61b70943b1 feat(cli): add option to select JS runtime other than node 2023-08-03 21:34:47 +03:00
Andrew Hlynskyi
485d192880 binding_rust: set_max_start_depth accepts optional to reset limit 2023-08-03 11:45:36 +03:00
Samuel Moelius
7b01d8ee05 Add test_query_max_start_depth_more 2023-08-03 11:45:34 +03:00
Samuel Moelius
41ec8b4166 Partially revert d4d5e29 2023-08-03 11:41:50 +03:00
Andrew Hlynskyi
7816397026 Add compile fail tests for LookaheadIterator 2023-08-03 03:49:57 +03:00
Andrew Hlynskyi
4eb22ed3ae Fix UB for LookaheadIterator 2023-08-03 03:49:57 +03:00
Andrew Hlynskyi
4f28ce4e3b Add async context tests for Node and TreeCursor 2023-08-03 03:03:03 +03:00
Amaan Qureshi
acef7a3cdf chore: add tests 2023-08-02 10:47:28 +01:00
Andrew Hlynskyi
a08c61235d Fix, reference by value for Language as everywhere 2023-08-02 00:04:24 +03:00
Daumantas Kavolis
ec90c215ae Add tests for bidirectional cursor 2023-08-02 00:02:33 +03:00
Daumantas Kavolis
1cb378b445 Add rust tests for lookahead iterator 2023-08-02 00:02:33 +03:00
Andrew Hlynskyi
19e665ef79 Add tests for TextProvider 2023-08-01 09:12:45 +03:00
Amaan Qureshi
b8f7645ae2
Merge pull request #2434 from amaanq/test-update
fix: retain header and divider delimiter lengths when updating tests
2023-07-27 13:40:53 -04: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
ee399e67d4
fix: retain header and divider delimiter lengths when updating tests
This helps to prevent visual bloat in diffs when updating tests where the delimiter is not 80 chars long
2023-07-27 03:31:46 -04:00
Amaan Qureshi
68b1006a3b
feat: add negative assertions, remove duplicate code 2023-07-25 00:27:34 -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
c521e9c18e
chore: improve error message in some spots loading grammar.json 2023-07-24 00:44:44 -04:00
Samuel Moelius
d9d4116105
Add test_consecutive_zero_or_modifiers 2023-07-19 03:27:43 -04:00
Max Brunsfeld
8310fd423e Update node unit test to reflect C grammar change 2023-07-18 17:58:19 -07:00
Max Brunsfeld
40f7b2ec97 Fix parsing of queries that start with repetitions followed by alternatives 2023-07-18 17:57:52 -07:00
Amaan Qureshi
e77405841e
refactor: make a subdirectory for the scratch dir depending on the machine's features 2023-07-18 20:14:21 -04:00
Amaan Qureshi
76f5f81aee
chore: update test 2023-07-18 19:29:40 -04:00
Amaan Qureshi
c436897662
test: bump start_time limit for sparc64 2023-07-18 19:07:51 -04:00
Amaan Qureshi
975f3f4686 refactor!: use AtomicUsize for AllocationRecorder for portability 2023-07-16 05:14:11 -04:00
Andrew Hlynskyi
0558f1e0bf test: add retries for all timeout tests 2023-07-16 05:05:36 +03:00
Max Brunsfeld
356f68293a Fix false positive query match bug, introduced in #2085 2023-07-10 16:12:59 -04:00
Amaan Qureshi
3504aa3260 fix(deps): bump proc-macro2 as an unstable feature became stabilized 2023-07-10 16:12:19 -04:00
Amaan Qureshi
b192200008 fix: update tests from python grammar changes 2023-07-10 14:40:18 -04:00
Max Brunsfeld
4922602369
Merge pull request #2316 from tree-sitter/node-descendant-index
Add APIs for retrieving descendant counts, seeking to nodes by their descendant index
2023-06-12 15:13:43 -07:00