File tree Expand file tree Collapse file tree 5 files changed +148
-34
lines changed
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/python Expand file tree Collapse file tree 5 files changed +148
-34
lines changed Original file line number Diff line number Diff line change
1
+ languageId : python
2
+ command :
3
+ version : 6
4
+ spokenForm : change value
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: value}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |-
15
+ if (x := 0) < 1:
16
+ pass
17
+ selections :
18
+ - anchor : {line: 0, character: 4}
19
+ active : {line: 0, character: 4}
20
+ marks : {}
21
+ finalState :
22
+ documentContents : |-
23
+ if (x := ) < 1:
24
+ pass
25
+ selections :
26
+ - anchor : {line: 0, character: 9}
27
+ active : {line: 0, character: 9}
Original file line number Diff line number Diff line change
1
+ languageId : python
2
+ command :
3
+ version : 6
4
+ spokenForm : change value
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: value}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |-
15
+ match aaa:
16
+ case {"bbb": ccc}:
17
+ pass
18
+ selections :
19
+ - anchor : {line: 1, character: 10}
20
+ active : {line: 1, character: 10}
21
+ marks : {}
22
+ finalState :
23
+ documentContents : |-
24
+ match aaa:
25
+ case {"bbb": }:
26
+ pass
27
+ selections :
28
+ - anchor : {line: 1, character: 17}
29
+ active : {line: 1, character: 17}
Original file line number Diff line number Diff line change
1
+ languageId : python
2
+ command :
3
+ version : 6
4
+ spokenForm : chuck value
5
+ action :
6
+ name : remove
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: value}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |-
15
+ if (x := 0) < 1:
16
+ pass
17
+ selections :
18
+ - anchor : {line: 0, character: 4}
19
+ active : {line: 0, character: 4}
20
+ marks : {}
21
+ finalState :
22
+ documentContents : |-
23
+ if (x ) < 1:
24
+ pass
25
+ selections :
26
+ - anchor : {line: 0, character: 4}
27
+ active : {line: 0, character: 4}
Original file line number Diff line number Diff line change
1
+ languageId : python
2
+ command :
3
+ version : 6
4
+ spokenForm : chuck value
5
+ action :
6
+ name : remove
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: value}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |-
15
+ match aaa:
16
+ case {"bbb": ccc}:
17
+ pass
18
+ selections :
19
+ - anchor : {line: 1, character: 10}
20
+ active : {line: 1, character: 10}
21
+ marks : {}
22
+ finalState :
23
+ documentContents : |-
24
+ match aaa:
25
+ case {"bbb"}:
26
+ pass
27
+ selections :
28
+ - anchor : {line: 1, character: 10}
29
+ active : {line: 1, character: 10}
Original file line number Diff line number Diff line change 27
27
(with_statement)
28
28
] @statement
29
29
30
- ;; a = 25
31
- ;; ^^
32
- ;; xxxx
33
- ;; ------
30
+ ;; !! a = 25
31
+ ;; ! ^^
32
+ ;; ! xxxx
33
+ ;; ! ------
34
34
(
35
35
(assignment
36
36
[
40
40
) @_.domain
41
41
)
42
42
43
- ;; a /= 25
44
- ;; ^^
45
- ;; xxxxx
46
- ;; -------
43
+ ;; !! a /= 25
44
+ ;; ! ^^
45
+ ;; ! xxxxx
46
+ ;; ! -------
47
47
(
48
48
(augmented_assignment
49
49
[
64
64
) @_.domain
65
65
)
66
66
67
- ;; d = {"a": 1234}
68
- ;; ^^^^
69
- ;; xxxxxx
70
- ;; ---------
67
+ ;; !! d = {"a": 1234}
68
+ ;; ! ^^^^
69
+ ;; ! xxxxxx
70
+ ;; ! ---------
71
71
;;
72
- ;; {value: key for (key, value) in d1.items()}
73
- ;; ^^^
74
- ;; xxxxx
75
- ;; ----------
76
- (pair
77
- ":" @_.leading
78
- value: (_) @value
79
- ) @_.domain
72
+ ;; !! {value: key for (key, value) in d1.items()}
73
+ ;; ! ^^^
74
+ ;; ! xxxxx
75
+ ;; ! ----------
76
+ (
77
+ (_
78
+ [
79
+ ":"
80
+ ":="
81
+ ] @_.leading
82
+ value: (_) @value
83
+ ) @_.domain
84
+ (#not-type? @_.domain subscript parameters)
85
+ )
80
86
81
- ;; def func(value: str=""):
82
- ;; ^^
83
- ;; xxx
84
- ;; -------------
87
+ ;; !! def func(value: str=""):
88
+ ;; ! ^^
89
+ ;; ! xxx
90
+ ;; ! -------------
85
91
(parameters
86
92
(_
87
93
"=" @_.leading
88
94
value: (_) @value
89
95
) @_.domain
90
96
)
91
97
92
- ;; def func():
93
- ;; return 1
94
- ;; ^
95
- ;; x
96
- ;; --------
98
+ ;; !! return 1
99
+ ;; ! ^
100
+ ;; ! --------
97
101
;;
98
102
;; NOTE: in tree-sitter, both "return" and the "1" are children of `return_statement`
99
103
;; but "return" is anonymous whereas "1" is named node, so no need to exclude explicitly
100
- (
101
- (return_statement
102
- (_) @value
103
- ) @_.domain
104
- )
104
+ (return_statement
105
+ (_) @value
106
+ ) @_.domain
105
107
106
108
(
107
109
(function_definition
You can’t perform that action at this time.
0 commit comments