File tree Expand file tree Collapse file tree 5 files changed +39
-0
lines changed
common/src/scopeSupportFacets
cursorless-vscode-e2e/src/suite/fixtures/scopes/python Expand file tree Collapse file tree 5 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
1212 "name.resource" : supported ,
1313 "name.resource.iteration" : supported ,
1414 "value.foreach" : supported ,
15+ "value.yield" : supported ,
1516 "value.resource" : supported ,
1617 "value.resource.iteration" : supported ,
1718
Original file line number Diff line number Diff line change @@ -299,6 +299,10 @@ export const scopeSupportFacetInfos: Record<
299299 description : "Value (RHS) of a field in a class / interface" ,
300300 scopeType : "value" ,
301301 } ,
302+ "value.yield" : {
303+ description : "Value of a yield statement" ,
304+ scopeType : "value" ,
305+ } ,
302306 "value.resource" : {
303307 description : "Value of a 'with' / 'use' / 'using' statement" ,
304308 scopeType : "value" ,
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ const scopeSupportFacets = [
7878 "value.return" ,
7979 "value.return.lambda" ,
8080 "value.field" ,
81+ "value.yield" ,
8182 "value.resource" ,
8283 "value.resource.iteration" ,
8384
Original file line number Diff line number Diff line change 1+ def aaa():
2+ yield bbb
3+ ---
4+
5+ [Content] = 1:10-1:13
6+ 1| yield bbb
7+ >---<
8+
9+ [Removal] = 1:9-1:13
10+ 1| yield bbb
11+ >----<
12+
13+ [Leading delimiter] = 1:9-1:10
14+ 1| yield bbb
15+ >-<
16+
17+ [Domain] = 1:4-1:13
18+ 1| yield bbb
19+ >---------<
20+
21+ [Insertion delimiter] = " "
Original file line number Diff line number Diff line change 142142 (_) @value
143143) @_.domain
144144
145+ ;; !! yield 1
146+ ;; ! ^
147+ ;; ! xx
148+ ;; ! -------
149+ ;;
150+ ;; NOTE: in tree-sitter, both "yield" and the "1" are children of `yield` but
151+ ;; "yield" is anonymous whereas "1" is named node, so no need to exclude
152+ ;; explicitly
153+ (yield
154+ (_) @value
155+ ) @_.domain
156+
145157;; !! with aaa:
146158;; ! ^^^
147159;; ! --------
You can’t perform that action at this time.
0 commit comments