Commit graph

83 commits

Author SHA1 Message Date
theanarkh
cd603fa981
feat: free memory automatically (#5225) 2026-01-18 14:39:52 -08:00
Piotr Osiewicz
c0b1710f8a Add containing range APIs to query cursor
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-12-03 18:06:16 -05:00
Amaan Qureshi
48a5077035 feat(web)!: add API for editing points and ranges 2025-09-19 17:40:26 -04:00
Amaan Qureshi
580cd9541a feat(web)!: remove deprecated functions 2025-09-12 02:50:30 -04:00
ObserverOfTime
dba8446d9e feat(web)!: use bigint for timeouts 2025-08-30 18:14:42 -04:00
ObserverOfTime
88e0b4cea4 docs: change WASM/wasm to Wasm
That is the official capitalisation.
2025-08-21 09:56:32 +03:00
WillLillis
eee41925aa fix(ci): increase timeouts for flaky tests 2025-04-19 10:59:09 +02:00
Riley Bruins
21390af2dd fix(web): correct childWithDescendant() functionality
This fix allows for more granular address control when marshalling nodes
across WASM. This is necessary for node methods which accept another
node as a parameter (i.e., `childWithDescendant()`)
2025-04-18 18:11:42 -04:00
Tamir Bahar
a380e1a259
refactor(web): change return types to Node[] in child-related methods 2025-03-15 09:09:31 -04:00
WillLillis
998fb34d15 fix(test): update expected tree-sitter-rust supertypes 2025-03-02 16:37:03 -05:00
Will Lillis
3b67861def
fix(wasm): restore passing in ERROR to descendantsOfType (#4226) 2025-02-19 14:47:10 -08:00
Allan Clements
cda634a1c4 feat: add error information in the progress callback
This allows users to bail parsing if an error was *definitely* detected
using the progress callback, as all possible stack versions have a
non-zero error cost.

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2025-01-25 02:47:39 -05:00
Amaan Qureshi
8bb1448a6f feat: add the semantic version to TSLanguage, and expose an API for retrieving it 2025-01-25 01:14:30 -05:00
Amaan Qureshi
a76934dda0 test: update tests 2025-01-23 00:43:27 -05:00
Amaan Qureshi
1f66d156b5 test: update tests 2025-01-21 12:36:15 -05:00
Amaan Qureshi
09cb4c5729 feat(web): document the API 2025-01-21 12:36:15 -05:00
Amaan Qureshi
be7716dfa7 feat(web)!: use the WASM module in the bindings, and not the other way around
Parser is no longer the default export, but you *must* call
`Parser.init()` before doing anything still
2025-01-21 12:36:15 -05:00
Amaan Qureshi
31ceb99603 feat: add and apply eslint config 2025-01-21 12:36:15 -05:00
Amaan Qureshi
2cae67892e feat(web)!: rewrite the library in TypeScript 2025-01-21 12:36:15 -05:00
WillLillis
cd6e766365 fix(wasm): allow passing in ERROR in descendantsOfType 2025-01-11 03:00:20 -05:00
Amaan Qureshi
2814c00faa fix(web): correct getExtent
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-01-06 01:55:15 -05:00
Amaan Qureshi
45fa028201 feat(web): add missing API functions
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-01-06 01:55:15 -05:00
Amaan Qureshi
ef39298342 feat(wasm): add Supertype API 2025-01-05 00:14:09 -05:00
Amaan Qureshi
5d99014bb8 style: rephrase extends beyond to contains or starts after 2024-12-28 18:53:08 -05:00
ObserverOfTime
ac37e60559 refactor(web): use fs/promises 2024-10-15 16:10:23 +00:00
Amaan Qureshi
3f424c0121 feat: add an API to time out query executions
Currently, if a predicate is hard to match on the Rust side, a sizable
query against a very large file can take forever, and ends up hanging.
This commit adds an API function `ts_query_cursor_set_timeout_micros` to
limit how long query execution is allowed to take, thereby negating the
chance of a hang to occur.
2024-08-31 14:33:28 -04:00
Amaan Qureshi
6304009209
fix(wasm): update test 2024-06-03 12:42:25 +02:00
Amaan Qureshi
96d18408a3 refactor(js): misc fixes & tidying 2024-04-11 22:35:43 -04:00
Amaan Qureshi
c1a63019a4 chore: update tests 2024-04-08 17:56:05 -04:00
Amaan Qureshi
99b93d83a1 feat(cli)!: add a separate build command to compile parsers
This allows users to build parsers without having to run `test` or
`parse` to invoke the compilation process, and allows them to output the
object file to wherever they like. The `build-wasm` command was merged
into this by just specifying the `--wasm` flag.
2024-03-17 05:36:30 -04:00
Amaan Qureshi
5c2f80ebb0 fix(bindings/wasm): fix Parser.getIncludedRanges() 2024-03-12 02:29:35 -04:00
Amaan Qureshi
728793a160 feat(wasm)!: keep API in-line with upstream and start aligning with node 2024-03-10 03:02:17 -04:00
Boris Verkhovskiy
c070c92722 refactor(wasm)!: make current*, is*, and has* methods properties 2024-03-08 00:27:06 -05:00
Amaan Qureshi
f526be8061 test: update html tests 2024-02-19 06:36:48 -05:00
Amaan Qureshi
4303ab99c9 fix: properly handle Query.matches when filtering out results 2024-02-13 16:40:05 -05:00
Amaan Qureshi
da0596ba38 chore: remove deprecated query parsing mechanism 2024-02-13 13:35:32 -05:00
Amaan Qureshi
96a440af35 chore(web): add and apply eslint formatting 2024-02-07 12:18:44 -05:00
Amaan Qureshi
8ab14a0ee5
fix(node): update tests 2024-02-02 11:30:24 -05:00
Andrew Dupont
24e41d2bb7 fix: Handle quantified predicates on web-tree-sitter properly
Test cases for all new predicates added in #2532
2023-11-28 13:07:32 -08:00
Amaan Qureshi
ec88699f1c
test(node): update bash test 2023-08-31 18:26:22 -04:00
Andrew Hlynskyi
b22e4fe3c9 chore: fix a wasm bash test 2023-08-25 17:36:03 +03:00
Tom Beckmann
b947145e53 add a test 2023-08-03 16:32:51 +02: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
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
1f52f2f1dc Symbols without aliases should be used for lookahead 2023-08-02 00:02:33 +03:00
Daumantas Kavolis
c47e217e73 API extensions 2023-08-02 00:02:33 +03:00
Andrew Hlynskyi
19bd5868eb Fix wasm tests 2023-01-06 08:32:26 +02:00
Douglas Creager
ad3907c2a6 wasm: Add matchLimit option to query methods
This exposes the new configurable match limits for query cursors.
2021-06-02 13:51:00 -04:00