Skip to content

Commit

Permalink
generator: fix oddity in MSVExpressionIterator.getNextExpression()
Browse files Browse the repository at this point in the history
If the current node is ignored due to isNoKnownElement(), the following
siblings on the same level were skipped as well - this appears a bit
suspicious.
  • Loading branch information
mistmist committed Jun 9, 2021
1 parent bcb0a31 commit 8256ac4
Show file tree
Hide file tree
Showing 4 changed files with 39,418 additions and 38,881 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ private Expression getNextExpression() {
Expression nextExpCandidate = children.get(0);
// DO NOT expand elements which occur more than one time in the ancestors hierarchy (i.e.
// since we compute the last element: Do not expand it, if it also occurs before)
mAncestorsAndCurrent.push(new UniqueAncestor(nextExpCandidate, 0));
if (isNoKnownElement(nextExpCandidate)) {
// GO DOWN - Proceed with first child
nextExpression = nextExpCandidate;
mAncestorsAndCurrent.push(new UniqueAncestor(nextExpression, 0));
}
}
}
Expand All @@ -230,10 +230,10 @@ private Expression getNextExpression() {
Expression nextExpCandidate = siblings.get(nextSiblingIndex);
// DO NOT expand elements which occur more than one time in the ancestors hierarchy (i.e.
// since we compute the last element: Do not expand it, if it also occurs before)
mAncestorsAndCurrent.push(new UniqueAncestor(nextExpCandidate, nextSiblingIndex));
if (isNoKnownElement(nextExpCandidate)) {
// GO RIGHT - Add next sibling to the stack
nextExpression = nextExpCandidate;
mAncestorsAndCurrent.push(new UniqueAncestor(nextExpression, nextSiblingIndex));
}
}
}
Expand Down
Loading

0 comments on commit 8256ac4

Please sign in to comment.