clarity-pattern-parser
Advanced tools
Comparing version 11.0.14 to 11.0.15
{ | ||
"name": "clarity-pattern-parser", | ||
"version": "11.0.14", | ||
"version": "11.0.15", | ||
"description": "Parsing Library for Typescript and Javascript.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -75,4 +75,6 @@ import { Node } from "../ast/Node"; | ||
this._firstIndex = cursor.index; | ||
this._cacheAncestors(); | ||
const pattern = this.getReferencePatternSafely(); | ||
this._cacheAncestors(pattern.id); | ||
if (this._isBeyondRecursiveAllowance()) { | ||
@@ -83,6 +85,6 @@ cursor.recordErrorAt(this._firstIndex, this._firstIndex, this); | ||
return this.getReferencePatternSafely().parse(cursor); | ||
return pattern.parse(cursor); | ||
} | ||
private _cacheAncestors() { | ||
private _cacheAncestors(id: string) { | ||
if (!this._cachedAncestors) { | ||
@@ -92,3 +94,3 @@ let pattern: Pattern | null = this.parent; | ||
while (pattern != null) { | ||
if (pattern.type === this.type && pattern.id === this._id) { | ||
if (pattern.id === id) { | ||
this._recursiveAncestors.push(pattern as Reference); | ||
@@ -99,3 +101,2 @@ } | ||
} | ||
} | ||
@@ -102,0 +103,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1307947
185
22546