Skip to content

Commit 9ea7641

Browse files
Migrate collection key
1 parent 90b6fcf commit 9ea7641

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

packages/cursorless-engine/src/languages/ruby.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
createPatternMatchers,
99
leadingMatcher,
1010
patternMatcher,
11-
trailingMatcher,
1211
} from "../util/nodeMatchers";
1312

1413
// Generated by the following command:
@@ -147,7 +146,6 @@ const nodeMatchers: Partial<
147146
"block_parameters",
148147
"argument_list",
149148
),
150-
collectionKey: trailingMatcher(["pair[key]"], [":"]),
151149
value: leadingMatcher(
152150
[
153151
"pair[value]",

queries/ruby.scm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,16 @@ operator: [
134134
method: (_) @_dummy
135135
(#eq? @_dummy lambda)
136136
) @anonymousFunction
137+
138+
;;!! {"1" => "one"}
139+
;;! ^^^
140+
;;! ^^^^^
141+
(pair
142+
key: (_) @collectionKey
143+
value: (_) @collectionKey.trailing.startOf
144+
) @_.domain
145+
146+
(hash
147+
"{" @collectionKey.iteration.start.endOf
148+
"}" @collectionKey.iteration.end.startOf
149+
)

0 commit comments

Comments
 (0)