Skip to content

Commit a0bbde7

Browse files
committed
ci: sync tsquerylsrc with upstream
1 parent d6bd648 commit a0bbde7

File tree

2 files changed

+58
-15
lines changed

2 files changed

+58
-15
lines changed

.tsqueryrc.json

Lines changed: 57 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
"type": "string",
6969
"arity": "required"
7070
},
71+
{
72+
"type": "string",
73+
"arity": "required"
74+
},
7175
{
7276
"type": "string",
7377
"arity": "variadic"
@@ -129,11 +133,13 @@
129133
},
130134
{
131135
"type": "string",
132-
"arity": "required"
136+
"arity": "required",
137+
"constraint": "named_node"
133138
},
134139
{
135140
"type": "string",
136-
"arity": "variadic"
141+
"arity": "variadic",
142+
"constraint": "named_node"
137143
}
138144
],
139145
"description": "match any of the given node types against all ancestors of a node"
@@ -145,15 +151,36 @@
145151
"arity": "required"
146152
},
147153
{
148-
"type": "any",
149-
"arity": "required"
154+
"type": "string",
155+
"arity": "required",
156+
"constraint": "named_node"
150157
},
151158
{
152-
"type": "any",
153-
"arity": "variadic"
159+
"type": "string",
160+
"arity": "variadic",
161+
"constraint": "named_node"
154162
}
155163
],
156164
"description": "match any of the given node types against the direct ancestor of a node"
165+
},
166+
"kind-eq": {
167+
"parameters": [
168+
{
169+
"type": "capture",
170+
"arity": "required"
171+
},
172+
{
173+
"type": "string",
174+
"arity": "required",
175+
"constraint": "named_node"
176+
},
177+
{
178+
"type": "string",
179+
"arity": "variadic",
180+
"constraint": "named_node"
181+
}
182+
],
183+
"description": "checks whether a capture corresponds to a given set of nodes"
157184
}
158185
},
159186
"valid_directives": {
@@ -182,19 +209,23 @@
182209
},
183210
{
184211
"type": "string",
185-
"arity": "required"
212+
"arity": "required",
213+
"constraint": "integer"
186214
},
187215
{
188216
"type": "string",
189-
"arity": "required"
217+
"arity": "required",
218+
"constraint": "integer"
190219
},
191220
{
192221
"type": "string",
193-
"arity": "required"
222+
"arity": "required",
223+
"constraint": "integer"
194224
},
195225
{
196226
"type": "string",
197-
"arity": "required"
227+
"arity": "required",
228+
"constraint": "integer"
198229
}
199230
],
200231
"description": "Takes the range of the captured node and applies an offset. This will set a new range in the form of a list like { {start_row}, {start_col}, {end_row}, {end_col} } for the captured node with `capture_id` as `metadata[capture_id].range`."
@@ -224,19 +255,31 @@
224255
},
225256
{
226257
"type": "string",
227-
"arity": "optional"
258+
"arity": "optional",
259+
"constraint": {
260+
"enum": ["0", "1"]
261+
}
228262
},
229263
{
230264
"type": "string",
231-
"arity": "optional"
265+
"arity": "optional",
266+
"constraint": {
267+
"enum": ["0", "1"]
268+
}
232269
},
233270
{
234271
"type": "string",
235-
"arity": "optional"
272+
"arity": "optional",
273+
"constraint": {
274+
"enum": ["0", "1"]
275+
}
236276
},
237277
{
238278
"type": "string",
239-
"arity": "optional"
279+
"arity": "optional",
280+
"constraint": {
281+
"enum": ["0", "1"]
282+
}
240283
}
241284
],
242285
"description": "Trims whitespace from the node. Sets a new `metadata[capture_id].range`. Takes a capture ID and, optionally, four integers to customize trimming behavior (`1` meaning trim, `0` meaning don't trim). When only given a capture ID, trims blank lines (lines that contain only whitespace, or are empty) from the end of the node (for backwards compatibility). Can trim all whitespace from both sides of the node if parameters are given."

queries/fennel/textobjects.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
.
181181
item: (_)
182182
item: (_)* @loop.inner
183-
(#any-of? @_sym "while"))
183+
(#eq? @_sym "while"))
184184

185185
(list
186186
call: (symbol) @_sym

0 commit comments

Comments
 (0)