clarity-pattern-parser 11.4.0 → 11.4.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.
@@ -92,7 +92,7 @@ export class TakeUntil implements Pattern {
92
92
 
93
93
  if (foundMatch) {
94
94
  cursor.moveTo(cursorIndex - 1);
95
- const value = cursor.getChars(this.startedOnIndex, cursorIndex - 1);
95
+ const value = cursor.substring(this.startedOnIndex, cursorIndex - 1);
96
96
  const node = Node.createValueNode(this._type, this._name, value);
97
97
 
98
98
  cursor.recordMatch(this, node);
@@ -18,7 +18,7 @@ export function generateErrorMessage(pattern: Pattern, cursor: Cursor) {
18
18
 
19
19
  const lastPattern = furthestMatch.pattern as Pattern;
20
20
  const suggestions = cleanSuggestions(lastPattern.getNextTokens());
21
- const strUpToError = cursor.getChars(0, endIndex);
21
+ const strUpToError = cursor.substring(0, endIndex);
22
22
  const lines = strUpToError.split("\n");
23
23
  const lastLine = lines[lines.length - 1];
24
24
  const line = lines.length;
package/tsconfig.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "moduleResolution": "node",
4
4
  "target": "es6",
5
5
  "module": "esnext",
6
- "lib": ["es2021"],
6
+ "lib": ["esnext"],
7
7
  "strict": true,
8
8
  "sourceMap": true,
9
9
  "declaration": true,