Commit graph

56 commits

Author SHA1 Message Date
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
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
Max Brunsfeld 82fab90c0b web: Add bindings for remaining field APIs 2019-09-04 09:30:36 -07:00
Max Brunsfeld 52126a6606 Update JS test to reflect typescript grammar changes 2019-08-08 10:23:17 -07:00
Max Brunsfeld 443ac1c1e5 Update python tests to reflect grammar changes 2019-07-22 09:55:30 -07:00
Max Brunsfeld f00b310908 wasm: Implement Node.descendantsOfType 2019-07-17 08:58:46 -07:00
Max Brunsfeld 1a33f1a665 Add TreeCursor.currentFieldName to wasm binding 2019-07-10 14:31:10 -05:00