lezer-tree
Advanced tools
Comparing version 0.13.0 to 0.13.1
@@ -0,1 +1,7 @@ | ||
## 0.13.1 (2021-02-11) | ||
### Bug fixes | ||
Fix a bug where building a tree from a buffer would go wrong for repeat nodes whose children were all repeat nodes of the same type. | ||
## 0.13.0 (2020-12-04) | ||
@@ -2,0 +8,0 @@ |
@@ -736,6 +736,2 @@ /// The default maximum length of a `TreeBuffer` node. | ||
let { id, start, end, size } = cursor; | ||
while (id == inRepeat) { | ||
cursor.next(); | ||
({ id, start, end, size } = cursor); | ||
} | ||
let startPos = start - parentStart; | ||
@@ -763,4 +759,8 @@ if (size < 0) { // Reused node | ||
let localInRepeat = id >= minRepeatType ? id : -1; | ||
while (cursor.pos > endPos) | ||
takeNode(start, endPos, localChildren, localPositions, localInRepeat); | ||
while (cursor.pos > endPos) { | ||
if (cursor.id == localInRepeat) | ||
cursor.next(); | ||
else | ||
takeNode(start, endPos, localChildren, localPositions, localInRepeat); | ||
} | ||
localChildren.reverse(); | ||
@@ -767,0 +767,0 @@ localPositions.reverse(); |
{ | ||
"name": "lezer-tree", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Syntax tree data structure for the lezer parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/tree.cjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
264628