wasm: Add matchLimit option to query methods

This exposes the new configurable match limits for query cursors.
This commit is contained in:
Douglas Creager 2021-06-02 13:51:00 -04:00
parent 1f6eac555c
commit ad3907c2a6
3 changed files with 37 additions and 7 deletions

View file

@ -256,7 +256,7 @@ describe("Query", () => {
(array (identifier) @pre (identifier) @post)
`);
const captures = query.captures(tree.rootNode);
const captures = query.captures(tree.rootNode, null, null, {matchLimit: 32});
assert.ok(query.didExceedMatchLimit());
});
});