Amaan Qureshi
2cae67892e
feat(web)!: rewrite the library in TypeScript
2025-01-21 12:36: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
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
728793a160
feat(wasm)!: keep API in-line with upstream and start aligning with node
2024-03-10 03:02:17 -04: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
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
Douglas Creager
e8eb3c5d5a
binding_web: Add Query.didExceedMatchLimit
...
This lets wasm clients check whether a query exceeded its maximum number
of in-progress matches.
2021-04-27 09:21:38 -04:00
Max Brunsfeld
41e9af2456
Avoid including undefined in return value of Query.matches
...
Fixes #932
2021-02-26 15:16:07 -08:00
Max Brunsfeld
9daec9cb22
Tweak impossible pattern error messages
2020-08-20 13:35:11 -07:00
Max Brunsfeld
1ae5cbc851
query: Handle #not-match? in rust, wasm bindings
2020-07-24 12:15:23 -07:00
Max Brunsfeld
28a779d6a0
wasm: Allow arbitrary predicates in queries
2020-06-01 13:28:52 -07:00
Max Brunsfeld
fce5c50f81
Fix wasm query tests
2020-05-11 16:19:42 -07:00
Max Brunsfeld
27149902f8
Handle is?, is-not?, and set! predicate functions in queries
2019-09-25 10:21:20 -07:00
Max Brunsfeld
b15e90bd26
Handle set! predicate function in queries
2019-09-24 11:54:24 -07:00
Max Brunsfeld
b79839b599
Use a more realistic example in one JS query unit test
2019-09-16 12:48:01 -07:00
Max Brunsfeld
d4d554b2ae
Add wasm bindings for predicates
2019-09-16 10:25:44 -07:00
Max Brunsfeld
a1fec71b19
Tweak QueryCursor to allow iterating either matches or captures
...
For syntax highlighting, we want to iterate over all of the captures in
order, and don't care about grouping the captures by pattern.
2019-09-13 15:19:04 -07:00
Max Brunsfeld
49ce2fddb9
Add wasm binding for running tree queries in a limited range
2019-09-12 12:14:04 -07:00
Max Brunsfeld
67dcbc3e73
Detect error when a prefix of a valid node name is used in a query
2019-09-11 21:23:46 -07:00
Max Brunsfeld
60467ae701
Fix bugs in binary search used in tree queries
2019-09-10 22:30:27 -07:00
Max Brunsfeld
52cda5f541
Start work on wasm binding to query API
2019-09-10 20:54:21 -07:00