File tree Expand file tree Collapse file tree 8 files changed +162
-4
lines changed
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/go Expand file tree Collapse file tree 8 files changed +162
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const one = 1
15
15
16
16
func mapsAndLists () {
17
17
_ = A {}
18
+ _ = A { /* comment */ }
18
19
_ = A {1 }
19
20
_ = A {1 , 2 }
20
21
_ = A {1 : 1 }
@@ -27,6 +28,7 @@ func mapsAndLists() {
27
28
_ = AA {{1 }, {one : 1 }}
28
29
_ = AA {{1 }, {}, {one : 1 }}
29
30
_ = & A {}
31
+ _ = & A { /* comment */ }
30
32
_ = & A {1 }
31
33
_ = & A {one : 1 }
32
34
_ = & A {1 : 1 }
Original file line number Diff line number Diff line change
1
+ languageId : go
2
+ command :
3
+ version : 6
4
+ spokenForm : change list
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: list}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : " _ = T{ /* foo */ a: 0, /* foo */ }"
15
+ selections :
16
+ - anchor : {line: 0, character: 34}
17
+ active : {line: 0, character: 34}
18
+ marks : {}
19
+ thrownError : {name: NoContainingScopeError}
Original file line number Diff line number Diff line change
1
+ languageId : go
2
+ command :
3
+ version : 6
4
+ spokenForm : change list cap
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: list}
12
+ mark : {type: decoratedSymbol, symbolColor: default, character: c}
13
+ usePrePhraseSnapshot : true
14
+ initialState :
15
+ documentContents : |
16
+ _ = T{ /* comment */ }
17
+ selections :
18
+ - anchor : {line: 0, character: 22}
19
+ active : {line: 0, character: 22}
20
+ marks :
21
+ default.c :
22
+ start : {line: 0, character: 10}
23
+ end : {line: 0, character: 17}
24
+ finalState :
25
+ documentContents : |
26
+ _ =
27
+ selections :
28
+ - anchor : {line: 0, character: 4}
29
+ active : {line: 0, character: 4}
Original file line number Diff line number Diff line change
1
+ languageId : go
2
+ command :
3
+ version : 6
4
+ spokenForm : change list cap
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: list}
12
+ mark : {type: decoratedSymbol, symbolColor: default, character: c}
13
+ usePrePhraseSnapshot : true
14
+ initialState :
15
+ documentContents : |
16
+ _ = &T{ /* comment */ }
17
+ selections :
18
+ - anchor : {line: 0, character: 23}
19
+ active : {line: 0, character: 23}
20
+ marks :
21
+ default.c :
22
+ start : {line: 0, character: 11}
23
+ end : {line: 0, character: 18}
24
+ finalState :
25
+ documentContents : |
26
+ _ =
27
+ selections :
28
+ - anchor : {line: 0, character: 4}
29
+ active : {line: 0, character: 4}
Original file line number Diff line number Diff line change
1
+ languageId : go
2
+ command :
3
+ version : 6
4
+ spokenForm : change map
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: map}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : _ = T{ /* foo */ 0, /* foo */ }
15
+ selections :
16
+ - anchor : {line: 0, character: 31}
17
+ active : {line: 0, character: 31}
18
+ marks : {}
19
+ thrownError : {name: NoContainingScopeError}
Original file line number Diff line number Diff line change
1
+ languageId : go
2
+ command :
3
+ version : 6
4
+ spokenForm : change map cap
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: map}
12
+ mark : {type: decoratedSymbol, symbolColor: default, character: c}
13
+ usePrePhraseSnapshot : true
14
+ initialState :
15
+ documentContents : |
16
+ _ = T{ /* comment */ }
17
+ selections :
18
+ - anchor : {line: 0, character: 22}
19
+ active : {line: 0, character: 22}
20
+ marks :
21
+ default.c :
22
+ start : {line: 0, character: 10}
23
+ end : {line: 0, character: 17}
24
+ finalState :
25
+ documentContents : |
26
+ _ =
27
+ selections :
28
+ - anchor : {line: 0, character: 4}
29
+ active : {line: 0, character: 4}
Original file line number Diff line number Diff line change
1
+ languageId : go
2
+ command :
3
+ version : 6
4
+ spokenForm : change map cap
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: map}
12
+ mark : {type: decoratedSymbol, symbolColor: default, character: c}
13
+ usePrePhraseSnapshot : true
14
+ initialState :
15
+ documentContents : |
16
+ _ = &T{ /* comment */ }
17
+ selections :
18
+ - anchor : {line: 0, character: 23}
19
+ active : {line: 0, character: 23}
20
+ marks :
21
+ default.c :
22
+ start : {line: 0, character: 11}
23
+ end : {line: 0, character: 18}
24
+ finalState :
25
+ documentContents : |
26
+ _ =
27
+ selections :
28
+ - anchor : {line: 0, character: 4}
29
+ active : {line: 0, character: 4}
Original file line number Diff line number Diff line change 138
138
)
139
139
140
140
;; empty composite literals
141
- ;;
142
- ;; each of these will fail to match { /* some comment */ }
143
- ;; because the comment node will break the anchoring.
144
- ;; this is rare enough to not be worth fixing now.
145
141
146
142
;; &T{}
147
143
(unary_expression
151
147
.
152
148
"{"
153
149
.
150
+ (comment)*
151
+ .
154
152
"}"
155
153
.
156
154
)
164
162
.
165
163
"{"
166
164
.
165
+ (comment)*
166
+ .
167
167
"}"
168
168
.
169
169
)
177
177
.
178
178
"{"
179
179
.
180
+ (comment)*
181
+ .
180
182
"}"
181
183
.
182
184
) @list @map
You can’t perform that action at this time.
0 commit comments