@willbooster/web-tree-sitter 18.0.3 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -763,258 +763,6 @@
763
763
  */
764
764
  resetTo(cursor: TreeCursor): void;
765
765
  }
766
- /**
767
- * Options for query execution
768
- */
769
- export interface QueryOptions {
770
- /** The start position of the range to query */
771
- startPosition?: Point;
772
- /** The end position of the range to query */
773
- endPosition?: Point;
774
- /** The start position of the range to query Only the matches that are fully
775
- * contained within provided range will be returned.
776
- **/
777
- startContainingPosition?: Point;
778
- /** The end position of the range to query Only the matches that are fully
779
- * contained within provided range will be returned.
780
- **/
781
- endContainingPosition?: Point;
782
- /** The start index of the range to query */
783
- startIndex?: number;
784
- /** The end index of the range to query */
785
- endIndex?: number;
786
- /** The start index of the range to query Only the matches that are fully
787
- * contained within provided range will be returned.
788
- **/
789
- startContainingIndex?: number;
790
- /** The end index of the range to query Only the matches that are fully
791
- * contained within provided range will be returned.
792
- **/
793
- endContainingIndex?: number;
794
- /**
795
- * The maximum number of in-progress matches for this query.
796
- * The limit must be > 0 and <= 65536.
797
- */
798
- matchLimit?: number;
799
- /**
800
- * The maximum start depth for a query cursor.
801
- *
802
- * This prevents cursors from exploring children nodes at a certain depth.
803
- * Note if a pattern includes many children, then they will still be
804
- * checked.
805
- *
806
- * The zero max start depth value can be used as a special behavior and
807
- * it helps to destructure a subtree by staying on a node and using
808
- * captures for interested parts. Note that the zero max start depth
809
- * only limit a search depth for a pattern's root node but other nodes
810
- * that are parts of the pattern may be searched at any depth what
811
- * defined by the pattern structure.
812
- *
813
- * Set to `null` to remove the maximum start depth.
814
- */
815
- maxStartDepth?: number;
816
- /**
817
- * A function that will be called periodically during the execution of the query to check
818
- * if query execution should be cancelled. You can also use this to instrument query execution
819
- * and check where the query is at in the document. The progress callback takes a single argument,
820
- * which is a {@link QueryState} representing the current state of the query.
821
- */
822
- progressCallback?: (state: QueryState) => boolean | void;
823
- }
824
- /**
825
- * A stateful object that is passed into the progress callback {@link QueryOptions#progressCallback}
826
- * to provide the current state of the query.
827
- */
828
- export interface QueryState {
829
- /** The byte offset in the document that the query is at. */
830
- currentOffset: number;
831
- }
832
- /** A record of key-value pairs associated with a particular pattern in a {@link Query}. */
833
- export type QueryProperties = Record<string, string | null>;
834
- /**
835
- * A predicate that contains an operator and list of operands.
836
- */
837
- export interface QueryPredicate {
838
- /** The operator of the predicate, like `match?`, `eq?`, `set!`, etc. */
839
- operator: string;
840
- /** The operands of the predicate, which are either captures or strings. */
841
- operands: PredicateStep[];
842
- }
843
- /**
844
- * A particular {@link Node} that has been captured with a particular name within a
845
- * {@link Query}.
846
- */
847
- export interface QueryCapture {
848
- /** The index of the pattern that matched. */
849
- patternIndex: number;
850
- /** The name of the capture */
851
- name: string;
852
- /** The captured node */
853
- node: Node;
854
- /** The properties for predicates declared with the operator `set!`. */
855
- setProperties?: QueryProperties;
856
- /** The properties for predicates declared with the operator `is?`. */
857
- assertedProperties?: QueryProperties;
858
- /** The properties for predicates declared with the operator `is-not?`. */
859
- refutedProperties?: QueryProperties;
860
- }
861
- /** A match of a {@link Query} to a particular set of {@link Node}s. */
862
- export interface QueryMatch {
863
- /** The index of the pattern that matched. */
864
- patternIndex: number;
865
- /** The captures associated with the match. */
866
- captures: QueryCapture[];
867
- /** The properties for predicates declared with the operator `set!`. */
868
- setProperties?: QueryProperties;
869
- /** The properties for predicates declared with the operator `is?`. */
870
- assertedProperties?: QueryProperties;
871
- /** The properties for predicates declared with the operator `is-not?`. */
872
- refutedProperties?: QueryProperties;
873
- }
874
- /** A quantifier for captures */
875
- export const CaptureQuantifier: {
876
- readonly Zero: 0;
877
- readonly ZeroOrOne: 1;
878
- readonly ZeroOrMore: 2;
879
- readonly One: 3;
880
- readonly OneOrMore: 4;
881
- };
882
- /** A quantifier for captures */
883
- export type CaptureQuantifier = typeof CaptureQuantifier[keyof typeof CaptureQuantifier];
884
- /**
885
- * Predicates are represented as a single array of steps. There are two
886
- * types of steps, which correspond to the two legal values for
887
- * the `type` field:
888
- *
889
- * - `CapturePredicateStep` - Steps with this type represent names
890
- * of captures.
891
- *
892
- * - `StringPredicateStep` - Steps with this type represent literal
893
- * strings.
894
- */
895
- export type PredicateStep = CapturePredicateStep | StringPredicateStep;
896
- /**
897
- * A step in a predicate that refers to a capture.
898
- *
899
- * The `name` field is the name of the capture.
900
- */
901
- interface CapturePredicateStep {
902
- type: 'capture';
903
- name: string;
904
- }
905
- /**
906
- * A step in a predicate that refers to a string.
907
- *
908
- * The `value` field is the string value.
909
- */
910
- interface StringPredicateStep {
911
- type: 'string';
912
- value: string;
913
- }
914
- export class Query {
915
- /** The names of the captures used in the query. */
916
- readonly captureNames: string[];
917
- /** The quantifiers of the captures used in the query. */
918
- readonly captureQuantifiers: CaptureQuantifier[][];
919
- /**
920
- * The other user-defined predicates associated with the given index.
921
- *
922
- * This includes predicates with operators other than:
923
- * - `match?`
924
- * - `eq?` and `not-eq?`
925
- * - `any-of?` and `not-any-of?`
926
- * - `is?` and `is-not?`
927
- * - `set!`
928
- */
929
- readonly predicates: QueryPredicate[][];
930
- /** The properties for predicates with the operator `set!`. */
931
- readonly setProperties: QueryProperties[];
932
- /** The properties for predicates with the operator `is?`. */
933
- readonly assertedProperties: QueryProperties[];
934
- /** The properties for predicates with the operator `is-not?`. */
935
- readonly refutedProperties: QueryProperties[];
936
- /** The maximum number of in-progress matches for this cursor. */
937
- matchLimit?: number;
938
- /**
939
- * Create a new query from a string containing one or more S-expression
940
- * patterns.
941
- *
942
- * The query is associated with a particular language, and can only be run
943
- * on syntax nodes parsed with that language. References to Queries can be
944
- * shared between multiple threads.
945
- *
946
- * @link {@see https://tree-sitter.github.io/tree-sitter/using-parsers/queries}
947
- */
948
- constructor(language: Language, source: string);
949
- /** Delete the query, freeing its resources. */
950
- delete(): void;
951
- /**
952
- * Iterate over all of the matches in the order that they were found.
953
- *
954
- * Each match contains the index of the pattern that matched, and a list of
955
- * captures. Because multiple patterns can match the same set of nodes,
956
- * one match may contain captures that appear *before* some of the
957
- * captures from a previous match.
958
- *
959
- * @param node - The node to execute the query on.
960
- *
961
- * @param options - Options for query execution.
962
- */
963
- matches(node: Node, options?: QueryOptions): QueryMatch[];
964
- /**
965
- * Iterate over all of the individual captures in the order that they
966
- * appear.
967
- *
968
- * This is useful if you don't care about which pattern matched, and just
969
- * want a single, ordered sequence of captures.
970
- *
971
- * @param node - The node to execute the query on.
972
- *
973
- * @param options - Options for query execution.
974
- */
975
- captures(node: Node, options?: QueryOptions): QueryCapture[];
976
- /** Get the predicates for a given pattern. */
977
- predicatesForPattern(patternIndex: number): QueryPredicate[];
978
- /**
979
- * Disable a certain capture within a query.
980
- *
981
- * This prevents the capture from being returned in matches, and also
982
- * avoids any resource usage associated with recording the capture.
983
- */
984
- disableCapture(captureName: string): void;
985
- /**
986
- * Disable a certain pattern within a query.
987
- *
988
- * This prevents the pattern from matching, and also avoids any resource
989
- * usage associated with the pattern. This throws an error if the pattern
990
- * index is out of bounds.
991
- */
992
- disablePattern(patternIndex: number): void;
993
- /**
994
- * Check if, on its last execution, this cursor exceeded its maximum number
995
- * of in-progress matches.
996
- */
997
- didExceedMatchLimit(): boolean;
998
- /** Get the byte offset where the given pattern starts in the query's source. */
999
- startIndexForPattern(patternIndex: number): number;
1000
- /** Get the byte offset where the given pattern ends in the query's source. */
1001
- endIndexForPattern(patternIndex: number): number;
1002
- /** Get the number of patterns in the query. */
1003
- patternCount(): number;
1004
- /** Get the index for a given capture name. */
1005
- captureIndexForName(captureName: string): number;
1006
- /** Check if a given pattern within a query has a single root node. */
1007
- isPatternRooted(patternIndex: number): boolean;
1008
- /** Check if a given pattern within a query has a single root node. */
1009
- isPatternNonLocal(patternIndex: number): boolean;
1010
- /**
1011
- * Check if a given step in a query is 'definite'.
1012
- *
1013
- * A query step is 'definite' if its parent pattern will be guaranteed to
1014
- * match successfully once it reaches the step.
1015
- */
1016
- isPatternGuaranteedAtStep(byteIndex: number): boolean;
1017
- }
1018
766
  export class LookaheadIterator implements Iterable<string> {
1019
767
  /**
1020
768
  * Get the current symbol of the lookahead iterator.
@@ -19,17 +19,6 @@
19
19
  "Tree",
20
20
  "Node",
21
21
  "TreeCursor",
22
- "QueryOptions",
23
- "QueryState",
24
- "QueryProperties",
25
- "QueryPredicate",
26
- "QueryCapture",
27
- "QueryMatch",
28
- "CaptureQuantifier",
29
- "PredicateStep",
30
- "CapturePredicateStep",
31
- "StringPredicateStep",
32
- "Query",
33
22
  "LookaheadIterator"
34
23
  ],
35
24
  "sources": [
@@ -41,7 +30,6 @@
41
30
  "src/tree.ts",
42
31
  "src/node.ts",
43
32
  "src/tree_cursor.ts",
44
- "src/query.ts",
45
33
  "src/lookahead_iterator.ts"
46
34
  ],
47
35
  "sourcesContent": [
@@ -53,9 +41,8 @@
53
41
  null,
54
42
  null,
55
43
  null,
56
- null,
57
44
  null
58
45
  ],
59
- "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBCjENC,iBAAiBA;;;;;;;;;cCLrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAsBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WC9GFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAsBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WC9GFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCIJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCNVC,iBAAiBA",
60
47
  "ignoreList": []
61
48
  }
@@ -763,258 +763,6 @@
763
763
  */
764
764
  resetTo(cursor: TreeCursor): void;
765
765
  }
766
- /**
767
- * Options for query execution
768
- */
769
- export interface QueryOptions {
770
- /** The start position of the range to query */
771
- startPosition?: Point;
772
- /** The end position of the range to query */
773
- endPosition?: Point;
774
- /** The start position of the range to query Only the matches that are fully
775
- * contained within provided range will be returned.
776
- **/
777
- startContainingPosition?: Point;
778
- /** The end position of the range to query Only the matches that are fully
779
- * contained within provided range will be returned.
780
- **/
781
- endContainingPosition?: Point;
782
- /** The start index of the range to query */
783
- startIndex?: number;
784
- /** The end index of the range to query */
785
- endIndex?: number;
786
- /** The start index of the range to query Only the matches that are fully
787
- * contained within provided range will be returned.
788
- **/
789
- startContainingIndex?: number;
790
- /** The end index of the range to query Only the matches that are fully
791
- * contained within provided range will be returned.
792
- **/
793
- endContainingIndex?: number;
794
- /**
795
- * The maximum number of in-progress matches for this query.
796
- * The limit must be > 0 and <= 65536.
797
- */
798
- matchLimit?: number;
799
- /**
800
- * The maximum start depth for a query cursor.
801
- *
802
- * This prevents cursors from exploring children nodes at a certain depth.
803
- * Note if a pattern includes many children, then they will still be
804
- * checked.
805
- *
806
- * The zero max start depth value can be used as a special behavior and
807
- * it helps to destructure a subtree by staying on a node and using
808
- * captures for interested parts. Note that the zero max start depth
809
- * only limit a search depth for a pattern's root node but other nodes
810
- * that are parts of the pattern may be searched at any depth what
811
- * defined by the pattern structure.
812
- *
813
- * Set to `null` to remove the maximum start depth.
814
- */
815
- maxStartDepth?: number;
816
- /**
817
- * A function that will be called periodically during the execution of the query to check
818
- * if query execution should be cancelled. You can also use this to instrument query execution
819
- * and check where the query is at in the document. The progress callback takes a single argument,
820
- * which is a {@link QueryState} representing the current state of the query.
821
- */
822
- progressCallback?: (state: QueryState) => boolean | void;
823
- }
824
- /**
825
- * A stateful object that is passed into the progress callback {@link QueryOptions#progressCallback}
826
- * to provide the current state of the query.
827
- */
828
- export interface QueryState {
829
- /** The byte offset in the document that the query is at. */
830
- currentOffset: number;
831
- }
832
- /** A record of key-value pairs associated with a particular pattern in a {@link Query}. */
833
- export type QueryProperties = Record<string, string | null>;
834
- /**
835
- * A predicate that contains an operator and list of operands.
836
- */
837
- export interface QueryPredicate {
838
- /** The operator of the predicate, like `match?`, `eq?`, `set!`, etc. */
839
- operator: string;
840
- /** The operands of the predicate, which are either captures or strings. */
841
- operands: PredicateStep[];
842
- }
843
- /**
844
- * A particular {@link Node} that has been captured with a particular name within a
845
- * {@link Query}.
846
- */
847
- export interface QueryCapture {
848
- /** The index of the pattern that matched. */
849
- patternIndex: number;
850
- /** The name of the capture */
851
- name: string;
852
- /** The captured node */
853
- node: Node;
854
- /** The properties for predicates declared with the operator `set!`. */
855
- setProperties?: QueryProperties;
856
- /** The properties for predicates declared with the operator `is?`. */
857
- assertedProperties?: QueryProperties;
858
- /** The properties for predicates declared with the operator `is-not?`. */
859
- refutedProperties?: QueryProperties;
860
- }
861
- /** A match of a {@link Query} to a particular set of {@link Node}s. */
862
- export interface QueryMatch {
863
- /** The index of the pattern that matched. */
864
- patternIndex: number;
865
- /** The captures associated with the match. */
866
- captures: QueryCapture[];
867
- /** The properties for predicates declared with the operator `set!`. */
868
- setProperties?: QueryProperties;
869
- /** The properties for predicates declared with the operator `is?`. */
870
- assertedProperties?: QueryProperties;
871
- /** The properties for predicates declared with the operator `is-not?`. */
872
- refutedProperties?: QueryProperties;
873
- }
874
- /** A quantifier for captures */
875
- export const CaptureQuantifier: {
876
- readonly Zero: 0;
877
- readonly ZeroOrOne: 1;
878
- readonly ZeroOrMore: 2;
879
- readonly One: 3;
880
- readonly OneOrMore: 4;
881
- };
882
- /** A quantifier for captures */
883
- export type CaptureQuantifier = typeof CaptureQuantifier[keyof typeof CaptureQuantifier];
884
- /**
885
- * Predicates are represented as a single array of steps. There are two
886
- * types of steps, which correspond to the two legal values for
887
- * the `type` field:
888
- *
889
- * - `CapturePredicateStep` - Steps with this type represent names
890
- * of captures.
891
- *
892
- * - `StringPredicateStep` - Steps with this type represent literal
893
- * strings.
894
- */
895
- export type PredicateStep = CapturePredicateStep | StringPredicateStep;
896
- /**
897
- * A step in a predicate that refers to a capture.
898
- *
899
- * The `name` field is the name of the capture.
900
- */
901
- interface CapturePredicateStep {
902
- type: 'capture';
903
- name: string;
904
- }
905
- /**
906
- * A step in a predicate that refers to a string.
907
- *
908
- * The `value` field is the string value.
909
- */
910
- interface StringPredicateStep {
911
- type: 'string';
912
- value: string;
913
- }
914
- export class Query {
915
- /** The names of the captures used in the query. */
916
- readonly captureNames: string[];
917
- /** The quantifiers of the captures used in the query. */
918
- readonly captureQuantifiers: CaptureQuantifier[][];
919
- /**
920
- * The other user-defined predicates associated with the given index.
921
- *
922
- * This includes predicates with operators other than:
923
- * - `match?`
924
- * - `eq?` and `not-eq?`
925
- * - `any-of?` and `not-any-of?`
926
- * - `is?` and `is-not?`
927
- * - `set!`
928
- */
929
- readonly predicates: QueryPredicate[][];
930
- /** The properties for predicates with the operator `set!`. */
931
- readonly setProperties: QueryProperties[];
932
- /** The properties for predicates with the operator `is?`. */
933
- readonly assertedProperties: QueryProperties[];
934
- /** The properties for predicates with the operator `is-not?`. */
935
- readonly refutedProperties: QueryProperties[];
936
- /** The maximum number of in-progress matches for this cursor. */
937
- matchLimit?: number;
938
- /**
939
- * Create a new query from a string containing one or more S-expression
940
- * patterns.
941
- *
942
- * The query is associated with a particular language, and can only be run
943
- * on syntax nodes parsed with that language. References to Queries can be
944
- * shared between multiple threads.
945
- *
946
- * @link {@see https://tree-sitter.github.io/tree-sitter/using-parsers/queries}
947
- */
948
- constructor(language: Language, source: string);
949
- /** Delete the query, freeing its resources. */
950
- delete(): void;
951
- /**
952
- * Iterate over all of the matches in the order that they were found.
953
- *
954
- * Each match contains the index of the pattern that matched, and a list of
955
- * captures. Because multiple patterns can match the same set of nodes,
956
- * one match may contain captures that appear *before* some of the
957
- * captures from a previous match.
958
- *
959
- * @param node - The node to execute the query on.
960
- *
961
- * @param options - Options for query execution.
962
- */
963
- matches(node: Node, options?: QueryOptions): QueryMatch[];
964
- /**
965
- * Iterate over all of the individual captures in the order that they
966
- * appear.
967
- *
968
- * This is useful if you don't care about which pattern matched, and just
969
- * want a single, ordered sequence of captures.
970
- *
971
- * @param node - The node to execute the query on.
972
- *
973
- * @param options - Options for query execution.
974
- */
975
- captures(node: Node, options?: QueryOptions): QueryCapture[];
976
- /** Get the predicates for a given pattern. */
977
- predicatesForPattern(patternIndex: number): QueryPredicate[];
978
- /**
979
- * Disable a certain capture within a query.
980
- *
981
- * This prevents the capture from being returned in matches, and also
982
- * avoids any resource usage associated with recording the capture.
983
- */
984
- disableCapture(captureName: string): void;
985
- /**
986
- * Disable a certain pattern within a query.
987
- *
988
- * This prevents the pattern from matching, and also avoids any resource
989
- * usage associated with the pattern. This throws an error if the pattern
990
- * index is out of bounds.
991
- */
992
- disablePattern(patternIndex: number): void;
993
- /**
994
- * Check if, on its last execution, this cursor exceeded its maximum number
995
- * of in-progress matches.
996
- */
997
- didExceedMatchLimit(): boolean;
998
- /** Get the byte offset where the given pattern starts in the query's source. */
999
- startIndexForPattern(patternIndex: number): number;
1000
- /** Get the byte offset where the given pattern ends in the query's source. */
1001
- endIndexForPattern(patternIndex: number): number;
1002
- /** Get the number of patterns in the query. */
1003
- patternCount(): number;
1004
- /** Get the index for a given capture name. */
1005
- captureIndexForName(captureName: string): number;
1006
- /** Check if a given pattern within a query has a single root node. */
1007
- isPatternRooted(patternIndex: number): boolean;
1008
- /** Check if a given pattern within a query has a single root node. */
1009
- isPatternNonLocal(patternIndex: number): boolean;
1010
- /**
1011
- * Check if a given step in a query is 'definite'.
1012
- *
1013
- * A query step is 'definite' if its parent pattern will be guaranteed to
1014
- * match successfully once it reaches the step.
1015
- */
1016
- isPatternGuaranteedAtStep(byteIndex: number): boolean;
1017
- }
1018
766
  export class LookaheadIterator implements Iterable<string> {
1019
767
  /**
1020
768
  * Get the current symbol of the lookahead iterator.
@@ -19,17 +19,6 @@
19
19
  "Tree",
20
20
  "Node",
21
21
  "TreeCursor",
22
- "QueryOptions",
23
- "QueryState",
24
- "QueryProperties",
25
- "QueryPredicate",
26
- "QueryCapture",
27
- "QueryMatch",
28
- "CaptureQuantifier",
29
- "PredicateStep",
30
- "CapturePredicateStep",
31
- "StringPredicateStep",
32
- "Query",
33
22
  "LookaheadIterator"
34
23
  ],
35
24
  "sources": [
@@ -41,7 +30,6 @@
41
30
  "src/tree.ts",
42
31
  "src/node.ts",
43
32
  "src/tree_cursor.ts",
44
- "src/query.ts",
45
33
  "src/lookahead_iterator.ts"
46
34
  ],
47
35
  "sourcesContent": [
@@ -53,9 +41,8 @@
53
41
  null,
54
42
  null,
55
43
  null,
56
- null,
57
44
  null
58
45
  ],
59
- "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBCjENC,iBAAiBA;;;;;;;;;cCLrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAsBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WC9GFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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