Yuta Saito
bf094bd98a
fix: exclude APIs that dup given file descriptors from WASI builds
...
WASI doesn't support `dup(2)` system call, so we cannot implement the
`print_dot_graph` and `print_dot_graphs` functions with exactly the same
semantics as in other platforms.
(cherry picked from commit 94a8262110 )
2024-09-30 09:21:54 -04:00
Amaan Qureshi
55fb817dc8
fix(rust): add missing TSNode functions
...
(cherry picked from commit 4387e44b98 )
2024-09-01 16:21:51 -04:00
DragonBillow
d13d7235d2
feat(lib): support no_std
2024-07-28 11:34:26 +03:00
ibrahim Sağıroğlu
76456919ae
docs: fix tree cursor documentation ( #3324 )
...
- ts_tree_cursor_current_depth
- ts_tree_cursor_reset
2024-07-28 10:36:06 +03:00
Amaan Qureshi
25c7189180
feat(lib): add ts_query_end_byte_for_pattern
2024-07-07 20:29:09 -04:00
Piotr Osiewicz
3c3699ba90
perf: hoist out common subexpressions in satisfies_text_predicates
...
This commit stores the result of text predicates evaluation in a separate variable to ensure that they're computed just once. As is, it is possible for e.g. #match predicates to match node against a regex twice.
2024-06-03 14:25:30 +02:00
Max Brunsfeld
38137c71b2
feat!: introduce tree-sitter-language crate for grammar crates to depend on
...
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-05-24 21:54:07 -04:00
vanaigr
90e0e28b95
feat: reverse iteration through node parents ( #3214 )
2024-04-23 15:19:57 +01:00
Liam Rosenfeld
0f125e2d09
fix(rust): use unix + wasi cfg instead of not windows for fd
2024-04-23 10:13:38 -04:00
Mark McCulloh
a7a47d561d
fix(rust): compilation on wasm32-wasi
2024-04-13 18:30:41 -04:00
Amaan Qureshi
abc7910381
refactor(rust): misc fixes & tidying
2024-04-11 22:35:43 -04:00
Amaan Qureshi
5825e24d56
style: wrap comments
2024-04-11 22:35:43 -04:00
Amaan Qureshi
b35efa8f33
style: format imports
2024-04-11 22:35:43 -04:00
Will Lillis
cbcb51b857
fix: tie the lifetime of the cursor to the query in QueryCursor::captures()
2024-04-09 12:19:06 -04:00
WillLillis
a7078a1561
fix: Add lifetime to mactches function
2024-04-03 22:06:19 -04:00
ObserverOfTime
4b12eab927
feat(lib): implement Display for Node
2024-03-17 06:12:28 -04:00
Amaan Qureshi
ad07fa8a9e
feat(bindings/rust): expose Parser::included_ranges
2024-03-12 02:29:35 -04:00
Amaan Qureshi
0a5a564ea7
0.22.0
2024-03-10 17:15:08 -04:00
Amaan Qureshi
f1eecf9786
feat: expose the allocator and array header files for external scanners
2024-02-26 09:43:13 -05:00
Amaan Qureshi
7980669267
feat: support dot graph output on windows
2024-02-08 15:21:47 -05:00
Max Brunsfeld
11e73bedc3
Remove unnecessary static lifetime
2024-02-05 11:57:24 -08:00
Max Brunsfeld
f4788b49c0
Merge branch 'master' into wasm-stdlib
2024-02-05 11:55:58 -08:00
Amaan Qureshi
28bb2a8c1c
chore(lib): apply clippy fixes
2024-02-04 04:18:59 -05:00
Max Brunsfeld
e054de4191
Return an error from build-wasm if scanner uses unavailable functions
2024-02-02 12:04:49 -08:00
Amaan Qureshi
f4c40f6098
fix: do not install parser.h
2024-02-02 11:30:24 -05:00
Max Brunsfeld
1d8975319c
Merge pull request #2840 from tree-sitter/language-reference-count
...
Introduce APIs for managing the lifetimes of languages, allow WASM languages to be deleted
2024-01-30 10:24:37 -08:00
Marshall Roch
6eacca9606
fix documentation typos
2024-01-25 20:33:15 -05:00
Max Brunsfeld
4a8e4b1963
Allow wasm languages to be deleted
2023-12-27 15:00:16 -08: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
f4e2f68f14
Merge branch 'master' into wasm-language
2023-10-27 12:11:43 +01:00
Andrew Hlynskyi
9cc1daafca
chore(ffi): remove enum name prefixes from all C enum values
2023-09-03 07:38:27 +03:00
Andrew Hlynskyi
52f7eaff31
chore(rust): make Query extra predicates state fully immutable
2023-09-02 23:12:28 +03:00
Amaan Qureshi
09ac28c77d
feat!: properly handle predicates used on quantified captures
2023-08-31 16:01:36 -04:00
mgunyho
bdc0e44d45
doc: Include README in top-level module documentation
2023-08-28 21:27:41 +03:00
mgunyho
8d894bb050
doc: Add backticks to all internal links
2023-08-28 19:26:38 +03:00
mgunyho
dcfd91fc25
doc: Add internal links to backticked text where applicable
2023-08-28 19:26:37 +03:00
mgunyho
4fabc49066
doc: Fix broken link
2023-08-28 19:26:33 +03:00
Andrew Hlynskyi
4278e03b11
feat: generate Rust bindings during build process
...
It can be used as:
> cargo build -p tree-sitter -F bindgen
2023-08-21 02:56:14 +03:00
Amaan Qureshi
458b5de0fc
feat: add any-of predicate
2023-08-17 22:20:57 -04:00
Andrew Hlynskyi
26c3ae7b98
Rename: ts_lookahead_iterator_advance -> ts_lookahead_iterator_next
2023-08-09 14:40:29 +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
485d192880
binding_rust: set_max_start_depth accepts optional to reset limit
2023-08-03 11:45:36 +03:00
Andrew Hlynskyi
d185f3126f
Make LookaheadIterator Sync and Send
2023-08-03 03:50:35 +03:00
Andrew Hlynskyi
4eb22ed3ae
Fix UB for LookaheadIterator
2023-08-03 03:49:57 +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
b456f831d1
Remove PartialOrd, Ord deriving from Range in Rust lib
2023-08-02 18:30:32 +03:00
Andrew Hlynskyi
1ac134a97d
Apply ts_node_is_error in Rust binding
2023-08-02 00:27:19 +03:00