File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/cursorless-engine/src/languages/TreeSitterQuery Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11import type { Position , TextDocument } from "@cursorless/common" ;
22import { showError , type TreeSitter } from "@cursorless/common" ;
33import type Parser from "web-tree-sitter" ;
4- import type { Query } from "web-tree-sitter" ;
54import { ide } from "../../singletons/ide.singleton" ;
65import { getNodeRange } from "../../util/nodeSelectors" ;
76import type {
@@ -32,7 +31,7 @@ export class TreeSitterQuery {
3231 /**
3332 * The raw tree-sitter query as parsed by tree-sitter from the query file
3433 */
35- private query : Query ,
34+ private query : Parser . Query ,
3635
3736 /**
3837 * The predicates for each pattern in the query. Each element of the outer
@@ -42,7 +41,11 @@ export class TreeSitterQuery {
4241 private patternPredicates : ( ( match : MutableQueryMatch ) => boolean ) [ ] [ ] ,
4342 ) { }
4443
45- static create ( languageId : string , treeSitter : TreeSitter , query : Query ) {
44+ static create (
45+ languageId : string ,
46+ treeSitter : TreeSitter ,
47+ query : Parser . Query ,
48+ ) {
4649 const { errors, predicates } = parsePredicates ( query . predicates ) ;
4750
4851 if ( errors . length > 0 ) {
You can’t perform that action at this time.
0 commit comments