clarity-pattern-parser 10.0.8 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.js +17 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +17 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/patterns/Cursor.d.ts +1 -0
- package/dist/patterns/CursorHistory.d.ts +7 -0
- package/package.json +1 -1
- package/src/patterns/Cursor.test.ts +59 -5
- package/src/patterns/Cursor.ts +4 -0
- package/src/patterns/CursorHistory.ts +21 -0
package/dist/index.browser.js
CHANGED
|
@@ -285,6 +285,7 @@
|
|
|
285
285
|
this._patterns = [];
|
|
286
286
|
this._nodes = [];
|
|
287
287
|
this._errors = [];
|
|
288
|
+
this._records = [];
|
|
288
289
|
}
|
|
289
290
|
get isRecording() {
|
|
290
291
|
return this._isRecording;
|
|
@@ -307,6 +308,9 @@
|
|
|
307
308
|
get error() {
|
|
308
309
|
return this._currentError;
|
|
309
310
|
}
|
|
311
|
+
get records() {
|
|
312
|
+
return this._records;
|
|
313
|
+
}
|
|
310
314
|
get nodes() {
|
|
311
315
|
return this._nodes;
|
|
312
316
|
}
|
|
@@ -317,6 +321,11 @@
|
|
|
317
321
|
if (this._isRecording) {
|
|
318
322
|
this._patterns.push(pattern);
|
|
319
323
|
this._nodes.push(node);
|
|
324
|
+
this._records.push({
|
|
325
|
+
pattern,
|
|
326
|
+
ast: node,
|
|
327
|
+
error: null
|
|
328
|
+
});
|
|
320
329
|
}
|
|
321
330
|
this._rootMatch.pattern = pattern;
|
|
322
331
|
this._rootMatch.node = node;
|
|
@@ -356,6 +365,11 @@
|
|
|
356
365
|
}
|
|
357
366
|
if (this._isRecording) {
|
|
358
367
|
this._errors.push(error);
|
|
368
|
+
this.records.push({
|
|
369
|
+
pattern,
|
|
370
|
+
ast: null,
|
|
371
|
+
error
|
|
372
|
+
});
|
|
359
373
|
}
|
|
360
374
|
}
|
|
361
375
|
startRecording() {
|
|
@@ -406,6 +420,9 @@
|
|
|
406
420
|
get errors() {
|
|
407
421
|
return this._history.errors;
|
|
408
422
|
}
|
|
423
|
+
get records() {
|
|
424
|
+
return this._history.records;
|
|
425
|
+
}
|
|
409
426
|
get index() {
|
|
410
427
|
return this._index;
|
|
411
428
|
}
|