Andrew Hlynskyi
7318cd5ef9
Merge pull request #2465 from tree-sitter/compact-func-style-calls
...
Make Rust code statements more compact and in functional style
2023-08-03 15:25:20 +03:00
Andrew Hlynskyi
e23e4cea18
Make Rust code statements more compact and in functional style
2023-08-03 14:28:00 +03:00
Andrew Hlynskyi
cb8c89fbd7
Merge pull request #2464 from tree-sitter/relax-lifetimes
...
feat: rework lifetimes, relax dependencies and tie only on implementations
2023-08-03 14:22:33 +03:00
Andrew Hlynskyi
c85f81f625
feat: rework lifetimes, relax deps and tie only on impls
2023-08-03 13:13:26 +03:00
Andrew Hlynskyi
3f7fd21fb3
Merge pull request #2278 from smoelius/partially-revert-d4d5e29
...
Partially revert d4d5e29
2023-08-03 12:24:04 +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
144c096a27
Merge pull request #2462 from tree-sitter/api-ext-ub
...
Fix UB for `LookaheadIterator`
2023-08-03 04:37:39 +03:00
Andrew Hlynskyi
d185f3126f
Make LookaheadIterator Sync and Send
2023-08-03 03:50:35 +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
63e1bc458b
Merge pull request #2456 from tree-sitter/additional-sync-send
...
Additional `Sync` and `Send` for `Node` and `TreeCursor`
2023-08-03 03:46:45 +03:00
Andrew Hlynskyi
1fbe929ad9
feat: define Sync, Send for Node and TreeCursor types
2023-08-03 03:03:03 +03:00
Andrew Hlynskyi
0f533b909d
chore: group Sync, Send impls by type
2023-08-03 03:03:03 +03:00
Andrew Hlynskyi
4f28ce4e3b
Add async context tests for Node and TreeCursor
2023-08-03 03:03:03 +03:00
Andrew Hlynskyi
73bb2c36fc
Merge pull request #2461 from tree-sitter/no-ord-on-range
...
Remove `PartialOrd, Ord` deriving from `Range` in Rust lib
2023-08-02 19:35:29 +03:00
Andrew Hlynskyi
b456f831d1
Remove PartialOrd, Ord deriving from Range in Rust lib
2023-08-02 18:30:32 +03:00
Amaan Qureshi
0c5a6eb525
Merge pull request #2458 from the-mikedavis/md-cancellation-highlight
...
feat(cli): Re-use highlight cancellation flag for HTML highlights
2023-08-02 10:38:56 -04:00
Michael Davis
3e499d675a
CLI: Re-use highlight cancellation flag for HTML highlights
...
The `html` highlight function created its own cancellation flag which
conflicts with the Ctrl-c handler set up in the CLI's `main` block
for `tree-sitter highlight`. We can re-use the cancellation flag from
that block to avoid a panic that happens when using `tree-sitter
highlight -H <file>`
thread 'main' panicked at 'Error setting Ctrl-C handler: MultipleHandlers', cli/src/util.rs:31:6
This change also aligns the parameters that `highlight::ansi` and
`highlight::html` take.
2023-08-02 08:56:26 -05:00
Amaan Qureshi
ca16a2b86e
Merge pull request #2445 from amaanq/eof-loop-token-rep
...
fix: do not allow eof to advance states if the new state is the same state
2023-08-02 07:49:18 -04:00
Amaan Qureshi
acef7a3cdf
chore: add tests
2023-08-02 10:47:28 +01:00
Amaan Qureshi
b8fe5fe21b
fix: do not allow eof to advance states if the new state is the same state
2023-08-02 10:47:27 +01:00
Andrew Hlynskyi
2284eecdc7
Merge pull request #2324 from daumantas-kavolis-sensmetry/api-extensions
...
Api extensions: previous sibling, last child, lookahead iterator
2023-08-02 01:44:27 +03:00
Andrew Hlynskyi
b9e3cc56d6
chore: apply common approach for api.h defs
2023-08-02 00:33:25 +03:00
Andrew Hlynskyi
1ac134a97d
Apply ts_node_is_error in Rust binding
2023-08-02 00:27:19 +03:00
Andrew Hlynskyi
a08c61235d
Fix, reference by value for Language as everywhere
2023-08-02 00:04:24 +03:00
Andrew Hlynskyi
759af6d0a4
Remove Copy, Clone from TSLookaheadIterator raw binding struct
2023-08-02 00:04:17 +03:00
Daumantas Kavolis
8c789bf7d5
After review
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
8d5462cea4
LookaheadIterator doesn't need lifetime annotation as it depends on language only
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
fd8fd3f535
Add tests for previous sibling, last child
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
e2c2e39e15
Delete parser and iterator
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
4d6a30a69e
Need to check that left row is also non-zero so that columns are not subtracted twice
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
e2094ef202
Add wasm tests for lookahead iterator
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
ab788619ca
Split wasm tests for next parse state
2023-08-02 00:02:33 +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
Daumantas Kavolis
672d38803e
Add iteration over names
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
1f52f2f1dc
Symbols without aliases should be used for lookahead
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
7267384970
Use step directly
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
c47e217e73
API extensions
2023-08-02 00:02:33 +03:00
Andrew Hlynskyi
08f4e82bb2
Merge pull request #2455 from tree-sitter/regen-bindings
...
chore: regenerate bindings.rs after #2370
2023-08-01 22:59:25 +03:00
Andrew Hlynskyi
cd1d717551
chore: regenerate bindings.rs after #2370
2023-08-01 21:33:55 +03:00
Amaan Qureshi
981bad03d0
Merge pull request #2454 from amaanq/eof-unused
...
fix: suppress unused warnings for eof
2023-08-01 09:09:02 -04:00
Amaan Qureshi
614f2f61c8
fix: suppress unused warnings for eof
2023-08-01 12:47:12 +01:00
Andrew Hlynskyi
374b973483
Merge pull request #2452 from tree-sitter/fieldid-non-opt
...
Restore `children_by_field_id` API to receive non option field id
2023-08-01 13:09:31 +03:00
Andrew Hlynskyi
9df5a686ca
Merge pull request #2451 from tree-sitter/fieldid-unchecked
...
chore: simply use FieldId::new because it contains id == 0 check
2023-08-01 13:08:11 +03:00
Andrew Hlynskyi
d489d71623
fix: children_by_field_id API to receive non option field id
2023-08-01 12:21:24 +03:00
Andrew Hlynskyi
fec7454ced
chore: simply use FieldId::new because it contains id == 0 check
2023-08-01 11:45:54 +03:00
Andrew Hlynskyi
3672463df1
Merge pull request #2431 from tree-sitter/text-provider1-fin
...
Improve TextProvider implementation to allow owned text
2023-08-01 10:40:34 +03:00