clarity-pattern-parser 11.2.1 → 11.2.2
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 +2 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +2 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/patterns/TakeUntil.ts +2 -5
package/package.json
CHANGED
|
@@ -62,6 +62,7 @@ export class TakeUntil implements Pattern {
|
|
|
62
62
|
this._startedOnIndex = cursor.index;
|
|
63
63
|
|
|
64
64
|
let terminatingResult = this._terminatingPattern.parse(cursor);
|
|
65
|
+
cursor.resolveError();
|
|
65
66
|
|
|
66
67
|
if (terminatingResult == null) {
|
|
67
68
|
foundMatch = true;
|
|
@@ -69,12 +70,11 @@ export class TakeUntil implements Pattern {
|
|
|
69
70
|
cursor.moveTo(cursorIndex);
|
|
70
71
|
cursorIndex += 1;
|
|
71
72
|
cursor.hasNext() && cursor.next();
|
|
72
|
-
|
|
73
|
-
cursor.resolveError();
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
while (true) {
|
|
77
76
|
terminatingResult = this._terminatingPattern.parse(cursor);
|
|
77
|
+
cursor.resolveError();
|
|
78
78
|
|
|
79
79
|
if (terminatingResult == null) {
|
|
80
80
|
cursor.moveTo(cursorIndex);
|
|
@@ -85,8 +85,6 @@ export class TakeUntil implements Pattern {
|
|
|
85
85
|
} else {
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
cursor.resolveError();
|
|
90
88
|
} else {
|
|
91
89
|
break;
|
|
92
90
|
}
|
|
@@ -97,7 +95,6 @@ export class TakeUntil implements Pattern {
|
|
|
97
95
|
const value = cursor.getChars(this.startedOnIndex, cursorIndex - 1);
|
|
98
96
|
return Node.createValueNode(this._type, this._name, value);
|
|
99
97
|
} else {
|
|
100
|
-
cursor.resolveError();
|
|
101
98
|
cursor.moveTo(this.startedOnIndex);
|
|
102
99
|
cursor.recordErrorAt(this._startedOnIndex, this._startedOnIndex, this);
|
|
103
100
|
return null;
|