File tree Expand file tree Collapse file tree
packages/cursorless-engine/src/languages/TreeSitterQuery Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ import { q } from "./operatorArgumentSchemaTypes";
88
99/**
1010 * A predicate operator that returns true if the node is of the given type.
11- * For example, `(#is- type? @foo string)` will accept the match if the `@foo`
11+ * For example, `(#type? @foo string)` will accept the match if the `@foo`
1212 * capture is a `string` node. It is acceptable to pass in multiple types, e.g.
13- * `(#is- type? @foo string comment)`.
13+ * `(#type? @foo string comment)`.
1414 */
15- class IsType extends QueryPredicateOperator < IsType > {
16- name = "is- type?" as const ;
15+ class Type extends QueryPredicateOperator < Type > {
16+ name = "type?" as const ;
1717 schema = z . tuple ( [ q . node , q . string ] ) . rest ( q . string ) ;
1818 run ( { node } : MutableQueryCapture , ...types : string [ ] ) {
1919 return types . includes ( node . type ) ;
@@ -388,7 +388,7 @@ class EmptySingleMultiDelimiter extends QueryPredicateOperator<EmptySingleMultiD
388388
389389export const queryPredicateOperators = [
390390 new Log ( ) ,
391- new IsType ( ) ,
391+ new Type ( ) ,
392392 new NotType ( ) ,
393393 new TrimEnd ( ) ,
394394 new DocumentRange ( ) ,
Original file line number Diff line number Diff line change 7979 (yield)
8080 ] @statement
8181 ) @_dummy
82- (#is- type?
82+ (#type?
8383 @_dummy
8484 begin_block
8585 begin
You can’t perform that action at this time.
0 commit comments