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.
@@ -10,7 +10,6 @@ export declare class Context implements Pattern {
10
10
  private _children;
11
11
  private _pattern;
12
12
  private _patterns;
13
- shouldCompactAst: boolean;
14
13
  get id(): string;
15
14
  get type(): string;
16
15
  get name(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-pattern-parser",
3
- "version": "11.0.0",
3
+ "version": "11.0.2",
4
4
  "description": "Parsing Library for Typescript and Javascript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -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