Commit graph

4348 commits

Author SHA1 Message Date
Andrew Hlynskyi
7938db90fe TextProvider with generic return type 2023-07-30 21:56:58 +03:00
Andrew Hlynskyi
0fb816d1f9
Merge pull request #2441 from tree-sitter/error-contexts
More error contexts + conv panics to errors with context
2023-07-30 21:54:32 +03:00
Andrew Hlynskyi
a2f834d846 More error contexts + conv panics to errors with context 2023-07-30 21:16:45 +03:00
Amaan Qureshi
dbc9da249c
Merge pull request #2440 from ganezdragon/doc-spelling-correction
docs: fix typo
2023-07-29 11:52:31 -04:00
Ganesan Arjuna Maharaja
f9f51480eb correcting the spelling of valid_symbols in indent dedent example 2023-07-29 20:55:33 +05:30
Amaan Qureshi
89c2ab926f
Merge pull request #2437 from amaanq/warn-unused
feat: warn when unused conflicts are present in a grammar
2023-07-28 00:59:35 -04:00
Amaan Qureshi
f4e788b28e
feat: warn when unused conflicts are present in a grammar 2023-07-28 00:23:28 -04: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
bff5be9360
Merge pull request #2422 from amaanq/query-err-range-bug
fix: take the last range element by default if the query error isn't found
2023-07-27 13:23:45 -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
0787c24a14
Merge pull request #2430 from amaanq/negative-assertions
Negative assertions
2023-07-27 12:44:12 -04:00
Amaan Qureshi
137483c7b9
fix: take the last range element by default if the query error isn't found 2023-07-27 12:34:47 -04:00
Amaan Qureshi
99366f3b5d
ci(sparc64): increase timeout time 2023-07-27 12:26:25 -04:00
Amaan Qureshi
7ad21396c2
feat!: use Option<NonZeroU16> for TSFieldIds 2023-07-27 12:26:25 -04:00
Amaan Qureshi
192793a6ab
fix: avoid panic if input is empty 2023-07-27 03:37:02 -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
7d4b0110a9
Merge pull request #2429 from the-mikedavis/md-prev-child-fix
ts_node__prev_child: Reset earlier node when backtracking
2023-07-25 16:22:36 -04:00
Amaan Qureshi
c1d227bdb7
docs: document negative assertions 2023-07-25 00:32:40 -04:00
Amaan Qureshi
68b1006a3b
feat: add negative assertions, remove duplicate code 2023-07-25 00:27:34 -04:00
Amaan Qureshi
c9fd357c06
fix: avoid infinite loop bug
If the current tag is the last tag and the test fails, the j loop neverends. This prevents that by checking that in the j loop
2023-07-24 23:43:25 -04:00
Amaan Qureshi
a809274009
Merge pull request #2426 from amaanq/sort-tests
fix(tests): sort categories alphabetically
2023-07-24 23:21:57 -04:00
Amaan Qureshi
9fbc34fd3e
Merge pull request #2425 from amaanq/abort
fix!: use `abort` instead of `exit(1)` when allocations fail
2023-07-24 16:56:48 -04:00
Michael Davis
5a8a4b0dcf
ts_node__prev_child: Reset earlier node when backtracking
`earlier_node` must be reset when backtracking up the tree or else
`ts_node__prev_child` may loop infinitely on a subtree which contains
zero-width tokens.
2023-07-24 15:08:55 -05:00
Amaan Qureshi
62e1d9902b
Merge pull request #2424 from amaanq/rust-docs
docs: update Rust bindings' README
2023-07-24 03:33:45 -04:00
Amaan Qureshi
36deb567c8
fix(tests): sort categories alphabetically 2023-07-24 03:05:09 -04:00
Amaan Qureshi
269a9a8ecf
fix!: use abort instead of exit(1) when allocations fail 2023-07-24 02:28:09 -04:00
Amaan Qureshi
a4f939520f
docs: update Rust bindings' README 2023-07-24 02:07:09 -04:00
Amaan Qureshi
8204d63da5
Merge pull request #2411 from amaanq/fuzz-and-more
update fuzz script, some minor fixes & improvements, add asan to ci
2023-07-24 01:45:24 -04:00
Amaan Qureshi
211e13d566
ci: add asan 2023-07-24 01:15:48 -04:00
Amaan Qureshi
56870fdda2
chore: remove unneeded include 2023-07-24 00:44:45 -04:00
Amaan Qureshi
a76701103e
fix(asan): only use slice::from_raw_parts if locals_query is not null 2023-07-24 00:44:44 -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
Amaan Qureshi
9a05739851
fix: typo 2023-07-24 00:44:44 -04:00
Amaan Qureshi
f9e5696bcb
ci: rework fuzzer script 2023-07-24 00:44:44 -04:00
Amaan Qureshi
3f44b89685
Merge pull request #2414 from amaanq/cc-flag
chore: make implicit function declarations a compile-time error
2023-07-20 07:37:28 -04:00
Amaan Qureshi
13de63a113 chore: update Cargo.lock 2023-07-20 07:04:49 -04:00
Amaan Qureshi
cf418a286e chore: make implicit function declarations a compile-time error 2023-07-20 06:52:50 -04:00
Amaan Qureshi
25cb8c7dac
Merge pull request #2370 from amaanq/wshadow
fix -Wshadow warnings, some clang-tidy lints, and sort includes
2023-07-19 19:34:58 -04:00
Amaan Qureshi
13f6ec2b0c
fix: rename shadowed variables from -Wshadow warnings and apply some useful clang-tidy warnings 2023-07-19 18:12:26 -04:00
Amaan Qureshi
9e99789e4c
Merge pull request #2407 from amaanq/bump-deps
Bump deps
2023-07-19 17:05:10 -04:00
Amaan Qureshi
fc1514d0cd
Merge pull request #2401 from amaanq/fix-inline-bug
fix: disallow inlining the first rule
2023-07-19 17:04:17 -04:00
Amaan Qureshi
5fba369c4a
fix: disallow inlining the first rule
This prevents a panic when indexing symbol_ids during the generation process
2023-07-19 16:14:58 -04:00
Amaan Qureshi
8f73fb502f
Merge pull request #2408 from amaanq/codeql-bugs
fix(lib): explicitly cast numbers to the same size in potential spots for infinite loops
2023-07-19 16:11:43 -04:00
Amaan Qureshi
2a5122e673
feat: better optimizations for release builds 2023-07-19 16:07:46 -04:00
Amaan Qureshi
6f38a76ead
Merge pull request #2281 from smoelius/consecutive-zero-or
fix: handle edge cases involving consecutive "zero or" modifiers
2023-07-19 15:21:28 -04:00
Amaan Qureshi
753fa1c3ff
fix(lib): explicitly cast numbers to the same size in potential spots for infinite loops 2023-07-19 03:49:14 -04:00
Samuel Moelius
a07cdb59f3
Handle edge cases involving consecutive "zero or" modifiers 2023-07-19 03:27:43 -04:00
Samuel Moelius
d9d4116105
Add test_consecutive_zero_or_modifiers 2023-07-19 03:27:43 -04:00
Amaan Qureshi
56cedba4bf
chore: bump dependencies 2023-07-19 03:18:17 -04:00