File tree Expand file tree Collapse file tree 8 files changed +86
-168
lines changed
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/nix Expand file tree Collapse file tree 8 files changed +86
-168
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,20 +11,18 @@ command:
11
11
scopeType : {type: branch}
12
12
usePrePhraseSnapshot : true
13
13
initialState :
14
- documentContents : |
14
+ documentContents : |-
15
15
{
16
- key = if a then b else c;
17
-
16
+ foo = if a then b else c;
18
17
}
19
18
selections :
20
19
- anchor : {line: 1, character: 9}
21
20
active : {line: 1, character: 9}
22
21
marks : {}
23
22
finalState :
24
- documentContents : |
23
+ documentContents : |-
25
24
{
26
- key = then b else c;
27
-
25
+ foo = else c;
28
26
}
29
27
selections :
30
28
- anchor : {line: 1, character: 8}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ languageId : nix
2
+ command :
3
+ version : 6
4
+ spokenForm : chuck arg
5
+ action :
6
+ name : remove
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: argumentOrParameter}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |
15
+ {
16
+ d = "Interpolated ${value1} string ${value2}";
17
+ }
18
+ selections :
19
+ - anchor : {line: 1, character: 26}
20
+ active : {line: 1, character: 26}
21
+ marks : {}
22
+ finalState :
23
+ documentContents : |
24
+ {
25
+ d = "Interpolated string ${value2}";
26
+ }
27
+ selections :
28
+ - anchor : {line: 1, character: 20}
29
+ active : {line: 1, character: 20}
Original file line number Diff line number Diff line change
1
+ languageId : nix
2
+ command :
3
+ version : 6
4
+ spokenForm : chuck key
5
+ action :
6
+ name : remove
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: collectionKey}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |
15
+ {
16
+ d = "Interpolated ${value1} string ${value2}";
17
+ }
18
+ selections :
19
+ - anchor : {line: 1, character: 6}
20
+ active : {line: 1, character: 6}
21
+ marks : {}
22
+ finalState :
23
+ documentContents : |
24
+ {
25
+ "Interpolated ${value1} string ${value2}";
26
+ }
27
+ selections :
28
+ - anchor : {line: 1, character: 2}
29
+ active : {line: 1, character: 2}
Original file line number Diff line number Diff line change 23
23
(
24
24
(assert_expression
25
25
"assert" @statement.start
26
- condition: (_) @condition
26
+ condition: (_)
27
27
";" @statement.end
28
28
body: (_)
29
29
) @_.domain
30
30
(#not-parent-type? @_.domain binding)
31
31
)
32
+ (assert_expression
33
+ "assert" @functionCallee @functionCall.start
34
+ condition: (_) @condition
35
+ body: (_) @branch @functionCall.end.startOf
36
+ ) @_.domain
32
37
33
38
(
34
39
(with_expression) @statement
52
57
;; ! ^^^^^^^^^^^^^^^^^^
53
58
(if_expression) @ifStatement @branch.iteration @condition.iteration
54
59
;; !! key = if a then b else c;
55
- ;; ! ^^^^
60
+ ;; ! ^^^^^^^^^^^
61
+ ;; ! xxxxxxxxxxxx
56
62
(if_expression
57
63
"if" @branch.start
58
- condition: (_) @branch.end
59
- )
60
- ;; !! key = if a then b else c;
61
- ;; ! ^^^^^^
62
- (if_expression
63
- "then" @branch.start
64
+ condition: (_)
65
+ "then"
64
66
consequence: (_) @branch.end
65
67
)
66
68
;; !! key = if a then b else c;
67
69
;; ! ^^^^^^
70
+ ;; ! xxxxxxx
68
71
(if_expression
69
72
"else" @branch.start
70
73
alternative: (_) @branch.end
93
96
94
97
;; !! foo = { x = 1; y = 2; };
95
98
;; ! ^
99
+ ;; ! xxxx
96
100
;; ! -----
97
101
(binding
98
- attrpath: (_) @collectionKey
102
+ attrpath: (_) @collectionKey @_.trailing.start.endOf
103
+ expression: (_) @_.trailing.end.startOf
99
104
) @_.domain
100
105
101
106
;; Strings
110
115
] @string
111
116
(string_fragment) @textFragment
112
117
118
+ ;; !! d = "foo ${bar} baz"
119
+ ;; ! ^^^^^^
120
+ ;; ! <**************>
121
+ (string_expression
122
+ (interpolation) @argumentOrParameter
123
+ ) @_.iteration
124
+
113
125
;; Functions
114
126
115
127
;; Note for this part of the function, we identify is as lambda only
166
178
167
179
;; !! a = 25;
168
180
;; ! ^
169
- ;; ! xx
181
+ ;; ! xxxx
170
182
;; ! -------
171
183
(binding
172
- (_) @name @_.leading.end.startOf
184
+ (_) @name @_.leading.end.startOf @_.trailing.start.endOf
173
185
.
174
- expression: (_)
186
+ expression: (_) @_.trailing.end.startOf
175
187
) @_.domain
You can’t perform that action at this time.
0 commit comments