@@ -17,6 +17,7 @@ const QUERY = [
17
17
"a b:" ,
18
18
"a (b:" ,
19
19
"_:" ,
20
+ "_:a" ,
20
21
"a-bb" ,
21
22
"a>bb" ,
22
23
"ab'" ,
@@ -48,7 +49,6 @@ const PARSED = [
48
49
foundElems : 0 ,
49
50
original : "<P>" ,
50
51
returned : [ ] ,
51
- typeFilter : - 1 ,
52
52
userQuery : "<p>" ,
53
53
error : "Found generics without a path" ,
54
54
} ,
@@ -57,7 +57,6 @@ const PARSED = [
57
57
foundElems : 0 ,
58
58
original : "-> <P>" ,
59
59
returned : [ ] ,
60
- typeFilter : - 1 ,
61
60
userQuery : "-> <p>" ,
62
61
error : "Found generics without a path" ,
63
62
} ,
@@ -66,7 +65,6 @@ const PARSED = [
66
65
foundElems : 0 ,
67
66
original : "a<\"P\">" ,
68
67
returned : [ ] ,
69
- typeFilter : - 1 ,
70
68
userQuery : "a<\"p\">" ,
71
69
error : "Unexpected `\"` in generics" ,
72
70
} ,
@@ -75,7 +73,6 @@ const PARSED = [
75
73
foundElems : 0 ,
76
74
original : "\"P\" \"P\"" ,
77
75
returned : [ ] ,
78
- typeFilter : - 1 ,
79
76
userQuery : "\"p\" \"p\"" ,
80
77
error : "Cannot have more than one literal search element" ,
81
78
} ,
@@ -84,7 +81,6 @@ const PARSED = [
84
81
foundElems : 0 ,
85
82
original : "P \"P\"" ,
86
83
returned : [ ] ,
87
- typeFilter : - 1 ,
88
84
userQuery : "p \"p\"" ,
89
85
error : "Cannot use literal search when there is more than one element" ,
90
86
} ,
@@ -93,7 +89,6 @@ const PARSED = [
93
89
foundElems : 0 ,
94
90
original : "\"p\" p" ,
95
91
returned : [ ] ,
96
- typeFilter : - 1 ,
97
92
userQuery : "\"p\" p" ,
98
93
error : "You cannot have more than one element if you use quotes" ,
99
94
} ,
@@ -102,7 +97,6 @@ const PARSED = [
102
97
foundElems : 0 ,
103
98
original : "\"const\": p" ,
104
99
returned : [ ] ,
105
- typeFilter : - 1 ,
106
100
userQuery : "\"const\": p" ,
107
101
error : "You cannot use quotes on type filter" ,
108
102
} ,
@@ -111,16 +105,14 @@ const PARSED = [
111
105
foundElems : 0 ,
112
106
original : "a<:a>" ,
113
107
returned : [ ] ,
114
- typeFilter : - 1 ,
115
108
userQuery : "a<:a>" ,
116
- error : "Unexpected `:` after `< `" ,
109
+ error : "Expected type filter before `: `" ,
117
110
} ,
118
111
{
119
112
elems : [ ] ,
120
113
foundElems : 0 ,
121
114
original : "a<::a>" ,
122
115
returned : [ ] ,
123
- typeFilter : - 1 ,
124
116
userQuery : "a<::a>" ,
125
117
error : "Unexpected `::`: paths cannot start with `::`" ,
126
118
} ,
@@ -129,7 +121,6 @@ const PARSED = [
129
121
foundElems : 0 ,
130
122
original : "((a))" ,
131
123
returned : [ ] ,
132
- typeFilter : - 1 ,
133
124
userQuery : "((a))" ,
134
125
error : "Unexpected `(`" ,
135
126
} ,
@@ -138,7 +129,6 @@ const PARSED = [
138
129
foundElems : 0 ,
139
130
original : "(p -> p" ,
140
131
returned : [ ] ,
141
- typeFilter : - 1 ,
142
132
userQuery : "(p -> p" ,
143
133
error : "Unexpected `(`" ,
144
134
} ,
@@ -147,7 +137,6 @@ const PARSED = [
147
137
foundElems : 0 ,
148
138
original : "::a::b" ,
149
139
returned : [ ] ,
150
- typeFilter : - 1 ,
151
140
userQuery : "::a::b" ,
152
141
error : "Paths cannot start with `::`" ,
153
142
} ,
@@ -156,7 +145,6 @@ const PARSED = [
156
145
foundElems : 0 ,
157
146
original : "a::::b" ,
158
147
returned : [ ] ,
159
- typeFilter : - 1 ,
160
148
userQuery : "a::::b" ,
161
149
error : "Unexpected `::::`" ,
162
150
} ,
@@ -165,7 +153,6 @@ const PARSED = [
165
153
foundElems : 0 ,
166
154
original : "a::b::" ,
167
155
returned : [ ] ,
168
- typeFilter : - 1 ,
169
156
userQuery : "a::b::" ,
170
157
error : "Paths cannot end with `::`" ,
171
158
} ,
@@ -174,7 +161,6 @@ const PARSED = [
174
161
foundElems : 0 ,
175
162
original : ":a" ,
176
163
returned : [ ] ,
177
- typeFilter : - 1 ,
178
164
userQuery : ":a" ,
179
165
error : "Expected type filter before `:`" ,
180
166
} ,
@@ -183,16 +169,14 @@ const PARSED = [
183
169
foundElems : 0 ,
184
170
original : "a b:" ,
185
171
returned : [ ] ,
186
- typeFilter : - 1 ,
187
172
userQuery : "a b:" ,
188
- error : "Unexpected `:`" ,
173
+ error : "Unexpected `:` (expected path after type filter) " ,
189
174
} ,
190
175
{
191
176
elems : [ ] ,
192
177
foundElems : 0 ,
193
178
original : "a (b:" ,
194
179
returned : [ ] ,
195
- typeFilter : - 1 ,
196
180
userQuery : "a (b:" ,
197
181
error : "Unexpected `(`" ,
198
182
} ,
@@ -201,16 +185,22 @@ const PARSED = [
201
185
foundElems : 0 ,
202
186
original : "_:" ,
203
187
returned : [ ] ,
204
- typeFilter : - 1 ,
205
188
userQuery : "_:" ,
189
+ error : "Unexpected `:` (expected path after type filter)" ,
190
+ } ,
191
+ {
192
+ elems : [ ] ,
193
+ foundElems : 0 ,
194
+ original : "_:a" ,
195
+ returned : [ ] ,
196
+ userQuery : "_:a" ,
206
197
error : "Unknown type filter `_`" ,
207
198
} ,
208
199
{
209
200
elems : [ ] ,
210
201
foundElems : 0 ,
211
202
original : "a-bb" ,
212
203
returned : [ ] ,
213
- typeFilter : - 1 ,
214
204
userQuery : "a-bb" ,
215
205
error : "Unexpected `-` (did you mean `->`?)" ,
216
206
} ,
@@ -219,7 +209,6 @@ const PARSED = [
219
209
foundElems : 0 ,
220
210
original : "a>bb" ,
221
211
returned : [ ] ,
222
- typeFilter : - 1 ,
223
212
userQuery : "a>bb" ,
224
213
error : "Unexpected `>` (did you mean `->`?)" ,
225
214
} ,
@@ -228,7 +217,6 @@ const PARSED = [
228
217
foundElems : 0 ,
229
218
original : "ab'" ,
230
219
returned : [ ] ,
231
- typeFilter : - 1 ,
232
220
userQuery : "ab'" ,
233
221
error : "Unexpected `'`" ,
234
222
} ,
@@ -237,7 +225,6 @@ const PARSED = [
237
225
foundElems : 0 ,
238
226
original : "a->" ,
239
227
returned : [ ] ,
240
- typeFilter : - 1 ,
241
228
userQuery : "a->" ,
242
229
error : "Expected at least one item after `->`" ,
243
230
} ,
@@ -246,7 +233,6 @@ const PARSED = [
246
233
foundElems : 0 ,
247
234
original : '"p" <a>' ,
248
235
returned : [ ] ,
249
- typeFilter : - 1 ,
250
236
userQuery : '"p" <a>' ,
251
237
error : "Found generics without a path" ,
252
238
} ,
@@ -255,7 +241,6 @@ const PARSED = [
255
241
foundElems : 0 ,
256
242
original : '"p" a<a>' ,
257
243
returned : [ ] ,
258
- typeFilter : - 1 ,
259
244
userQuery : '"p" a<a>' ,
260
245
error : "You cannot have more than one element if you use quotes" ,
261
246
} ,
@@ -264,7 +249,6 @@ const PARSED = [
264
249
foundElems : 0 ,
265
250
original : 'a,<' ,
266
251
returned : [ ] ,
267
- typeFilter : - 1 ,
268
252
userQuery : 'a,<' ,
269
253
error : 'Found generics without a path' ,
270
254
} ,
@@ -273,7 +257,6 @@ const PARSED = [
273
257
foundElems : 0 ,
274
258
original : 'aaaaa<>b' ,
275
259
returned : [ ] ,
276
- typeFilter : - 1 ,
277
260
userQuery : 'aaaaa<>b' ,
278
261
error : 'Expected `,`, ` `, `:` or `->`, found `b`' ,
279
262
} ,
@@ -282,16 +265,14 @@ const PARSED = [
282
265
foundElems : 0 ,
283
266
original : 'fn:aaaaa<>b' ,
284
267
returned : [ ] ,
285
- typeFilter : - 1 ,
286
268
userQuery : 'fn:aaaaa<>b' ,
287
- error : 'Expected `,`, ` ` or `->`, found `b`' ,
269
+ error : 'Expected `,`, ` `, `:` or `->`, found `b`' ,
288
270
} ,
289
271
{
290
272
elems : [ ] ,
291
273
foundElems : 0 ,
292
274
original : '->a<>b' ,
293
275
returned : [ ] ,
294
- typeFilter : - 1 ,
295
276
userQuery : '->a<>b' ,
296
277
error : 'Expected `,` or ` `, found `b`' ,
297
278
} ,
@@ -300,7 +281,6 @@ const PARSED = [
300
281
foundElems : 0 ,
301
282
original : 'a<->' ,
302
283
returned : [ ] ,
303
- typeFilter : - 1 ,
304
284
userQuery : 'a<->' ,
305
285
error : 'Unexpected `-` after `<`' ,
306
286
} ,
@@ -309,7 +289,6 @@ const PARSED = [
309
289
foundElems : 0 ,
310
290
original : 'a:: a' ,
311
291
returned : [ ] ,
312
- typeFilter : - 1 ,
313
292
userQuery : 'a:: a' ,
314
293
error : 'Paths cannot end with `::`' ,
315
294
} ,
@@ -318,7 +297,6 @@ const PARSED = [
318
297
foundElems : 0 ,
319
298
original : 'a ::a' ,
320
299
returned : [ ] ,
321
- typeFilter : - 1 ,
322
300
userQuery : 'a ::a' ,
323
301
error : 'Paths cannot start with `::`' ,
324
302
} ,
@@ -327,16 +305,14 @@ const PARSED = [
327
305
foundElems : 0 ,
328
306
original : "a<a>:" ,
329
307
returned : [ ] ,
330
- typeFilter : - 1 ,
331
308
userQuery : "a<a>:" ,
332
- error : 'Unexpected `:` ' ,
309
+ error : 'Unexpected `<` in type filter ' ,
333
310
} ,
334
311
{
335
312
elems : [ ] ,
336
313
foundElems : 0 ,
337
314
original : "a<>:" ,
338
315
returned : [ ] ,
339
- typeFilter : - 1 ,
340
316
userQuery : "a<>:" ,
341
317
error : 'Unexpected `<` in type filter' ,
342
318
} ,
@@ -345,7 +321,6 @@ const PARSED = [
345
321
foundElems : 0 ,
346
322
original : "a,:" ,
347
323
returned : [ ] ,
348
- typeFilter : - 1 ,
349
324
userQuery : "a,:" ,
350
325
error : 'Unexpected `,` in type filter' ,
351
326
} ,
@@ -354,7 +329,6 @@ const PARSED = [
354
329
foundElems : 0 ,
355
330
original : "a<> :" ,
356
331
returned : [ ] ,
357
- typeFilter : - 1 ,
358
332
userQuery : "a<> :" ,
359
333
error : 'Unexpected `<` in type filter' ,
360
334
} ,
@@ -363,7 +337,6 @@ const PARSED = [
363
337
foundElems : 0 ,
364
338
original : "mod : :" ,
365
339
returned : [ ] ,
366
- typeFilter : - 1 ,
367
340
userQuery : "mod : :" ,
368
341
error : 'Unexpected `:`' ,
369
342
} ,
@@ -372,7 +345,6 @@ const PARSED = [
372
345
foundElems : 0 ,
373
346
original : "a!a" ,
374
347
returned : [ ] ,
375
- typeFilter : - 1 ,
376
348
userQuery : "a!a" ,
377
349
error : 'Unexpected `!`: it can only be at the end of an ident' ,
378
350
} ,
@@ -381,7 +353,6 @@ const PARSED = [
381
353
foundElems : 0 ,
382
354
original : "a!!" ,
383
355
returned : [ ] ,
384
- typeFilter : - 1 ,
385
356
userQuery : "a!!" ,
386
357
error : 'Cannot have more than one `!` in an ident' ,
387
358
} ,
@@ -390,7 +361,6 @@ const PARSED = [
390
361
foundElems : 0 ,
391
362
original : "mod:a!" ,
392
363
returned : [ ] ,
393
- typeFilter : - 1 ,
394
364
userQuery : "mod:a!" ,
395
365
error : 'Invalid search type: macro `!` and `mod` both specified' ,
396
366
} ,
@@ -399,7 +369,6 @@ const PARSED = [
399
369
foundElems : 0 ,
400
370
original : "a!::a" ,
401
371
returned : [ ] ,
402
- typeFilter : - 1 ,
403
372
userQuery : "a!::a" ,
404
373
error : 'Cannot have associated items in macros' ,
405
374
} ,
@@ -408,7 +377,6 @@ const PARSED = [
408
377
foundElems : 0 ,
409
378
original : "a<" ,
410
379
returned : [ ] ,
411
- typeFilter : - 1 ,
412
380
userQuery : "a<" ,
413
381
error : "Unclosed `<`" ,
414
382
} ,
0 commit comments