Skip to content

Commit bb2e3d3

Browse files
More tests
1 parent 0bc9162 commit bb2e3d3

File tree

4 files changed

+43
-5
lines changed

4 files changed

+43
-5
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@function calculate-margin() {}
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:10-0:26
6+
>----------------<
7+
0| @function calculate-margin() {}
8+
9+
[Leading delimiter] = 0:9-0:10
10+
>-<
11+
0| @function calculate-margin() {}
12+
13+
[Domain] = 0:0-0:31
14+
>-------------------------------<
15+
0| @function calculate-margin() {}
16+
17+
[Insertion delimiter] = " "
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@mixin replace-text() {}
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:7-0:19
6+
>------------<
7+
0| @mixin replace-text() {}
8+
9+
[Leading delimiter] = 0:6-0:7
10+
>-<
11+
0| @mixin replace-text() {}
12+
13+
[Domain] = 0:0-0:24
14+
>------------------------<
15+
0| @mixin replace-text() {}
16+
17+
[Insertion delimiter] = " "

packages/cursorless-engine/src/languages/TreeSitterQuery/queryPredicateOperators.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Range, adjustPosition, type Position } from "@cursorless/common";
1+
import type { Position } from "@cursorless/common";
2+
import { Range, adjustPosition } from "@cursorless/common";
23
import { z } from "zod";
34
import { makeRangeFromPositions } from "../../util/nodeSelectors";
45
import type { MutableQueryCapture } from "./QueryCapture";

queries/scss.scm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@
8383

8484
;;!! foo($foo: 123)
8585
;;! ^^^^ ^^^
86-
(parameter
87-
(variable_name) @name
88-
(default_value)? @value
89-
) @_.domain
86+
(
87+
(parameter
88+
(variable_name) @name
89+
(default_value)? @value
90+
) @_.domain
91+
(#not-eq? @_.domain "")
92+
)
9093

9194
(stylesheet) @namedFunction.iteration @functionName.iteration
9295
(block

0 commit comments

Comments
 (0)