clarity-pattern-parser 11.0.5 → 11.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-pattern-parser",
3
- "version": "11.0.5",
3
+ "version": "11.0.6",
4
4
  "description": "Parsing Library for Typescript and Javascript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -430,7 +430,7 @@ describe("AutoComplete", () => {
430
430
  test("Repeat with bad trailing content", () => {
431
431
  const flags = ["FlagA", "FlagB", "FlagC"];
432
432
  const pattern = generateExpression(flags);
433
- const result = new AutoComplete(pattern).suggestFor("FlagA AND FlagAlkjhgB")
433
+ const result = new AutoComplete(pattern).suggestFor("FlagA AND FlagAlkjhgB");
434
434
 
435
435
  expect(result.options).toEqual([]);
436
436
  expect(result.ast?.value).toBe("FlagA AND FlagA");
@@ -183,7 +183,7 @@ export class ExpressionPattern implements Pattern {
183
183
  pattern = this._unwrapAssociationIfNecessary(pattern);
184
184
 
185
185
  const firstChild = pattern.children[0];
186
- const lastChild = pattern.children[1];
186
+ const lastChild = pattern.children[pattern.children.length -1];
187
187
  const firstChildIsReference = this._isRecursiveReference(firstChild);
188
188
  const lastChildIsReference = this._isRecursiveReference(lastChild);
189
189