clarity-pattern-parser 11.0.0 → 11.0.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 +3 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +3 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/patterns/Context.d.ts +0 -1
- package/package.json +1 -1
- package/src/patterns/Context.ts +0 -3
- package/src/patterns/ExpressionPattern.ts +2 -1
- package/src/patterns/PrecedenceTree.ts +1 -1
package/package.json
CHANGED
package/src/patterns/Context.ts
CHANGED
|
@@ -14,8 +14,6 @@ export class Context implements Pattern {
|
|
|
14
14
|
private _pattern: Pattern;
|
|
15
15
|
private _patterns: Record<string, Pattern>;
|
|
16
16
|
|
|
17
|
-
shouldCompactAst = false;
|
|
18
|
-
|
|
19
17
|
get id(): string {
|
|
20
18
|
return this._id;
|
|
21
19
|
}
|
|
@@ -82,7 +80,6 @@ export class Context implements Pattern {
|
|
|
82
80
|
clone(name = this._name): Pattern {
|
|
83
81
|
const clone = new Context(name, this._pattern, Object.values(this._patterns));
|
|
84
82
|
clone._id = this._id;
|
|
85
|
-
clone.shouldCompactAst = this.shouldCompactAst;
|
|
86
83
|
return clone;
|
|
87
84
|
}
|
|
88
85
|
|
|
@@ -256,6 +256,7 @@ export class ExpressionPattern implements Pattern {
|
|
|
256
256
|
return node;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
cursor.moveTo(this._firstIndex);
|
|
259
260
|
cursor.recordErrorAt(this._firstIndex, this._firstIndex, this);
|
|
260
261
|
return null;
|
|
261
262
|
}
|
|
@@ -415,8 +416,8 @@ export class ExpressionPattern implements Pattern {
|
|
|
415
416
|
|
|
416
417
|
break;
|
|
417
418
|
} else {
|
|
418
|
-
cursor.resolveError();
|
|
419
419
|
cursor.moveTo(onIndex);
|
|
420
|
+
cursor.resolveError();
|
|
420
421
|
}
|
|
421
422
|
}
|
|
422
423
|
|
|
@@ -147,7 +147,7 @@ export class PrecedenceTree {
|
|
|
147
147
|
let node = this._atomNode;
|
|
148
148
|
|
|
149
149
|
if (this._prefixNode != null && this._atomNode != null) {
|
|
150
|
-
node = this._prefixNode;
|
|
150
|
+
node = this._prefixNode.findRoot();
|
|
151
151
|
this._prefixPlaceholder.replaceWith(this._atomNode);
|
|
152
152
|
}
|
|
153
153
|
|