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
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
f462f0d09d
Fix small issues with new wasm bindings
2021-02-05 10:18:37 -08:00
hvithrafn
752372ee09
Add several bindings for Language
2021-02-01 13:01:10 -07:00
Max Brunsfeld
0f492e4254
Include ts_tree_copy in wasm build
...
Fixes #846
2020-12-11 13:48:22 -08:00
Joel Spadin
7ef73b2e08
web binding: fix equals()
...
Node.equals() used to always return true. Now it works.
Also added unit tests for it.
2020-11-26 14:43:27 -06: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
d25b71182e
Update bash unit test to reflect field additions
2019-12-10 14:12:45 -08:00
Max Brunsfeld
f736cb3896
web: Implement TreeCursor.nodeText
...
Refs #466
2019-10-22 12:58:27 -07:00
Max Brunsfeld
060e00463d
Implement include-children directive in injection queries
2019-10-14 17:38: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