clarity-pattern-parser 10.1.8 → 10.1.9
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 +6 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/patterns/Options.ts +6 -2
package/dist/index.browser.js
CHANGED
|
@@ -1027,12 +1027,16 @@
|
|
|
1027
1027
|
return null;
|
|
1028
1028
|
}
|
|
1029
1029
|
_tryToParse(cursor) {
|
|
1030
|
-
|
|
1030
|
+
let children = this._children;
|
|
1031
|
+
if (depthCache$1.getDepth(this._id, this._firstIndex) > 1) {
|
|
1032
|
+
children = this._children.reverse();
|
|
1033
|
+
}
|
|
1034
|
+
else if (depthCache$1.getDepth(this._id, this._firstIndex) > 2) {
|
|
1031
1035
|
cursor.recordErrorAt(this._firstIndex, this._firstIndex, this);
|
|
1032
1036
|
return null;
|
|
1033
1037
|
}
|
|
1034
1038
|
const results = [];
|
|
1035
|
-
for (const pattern of
|
|
1039
|
+
for (const pattern of children) {
|
|
1036
1040
|
cursor.moveTo(this._firstIndex);
|
|
1037
1041
|
let result = null;
|
|
1038
1042
|
result = pattern.parse(cursor);
|