Skip to content

Commit

Permalink
Fixed regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterOlivier committed Oct 25, 2024
1 parent 1633109 commit e123bdc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/org/rascalmpl/parser/gtd/SGTDBF.java
Original file line number Diff line number Diff line change
Expand Up @@ -1701,13 +1701,14 @@ private IConstructor fixErrorAppl(ITree tree,
newChild = introduceErrorNodes(child, nodeConstructorFactory);
}

if (newChild != child || errorTree) {
if (newChildren == null) {
newChildren = new ArrayList<>(childCount);
for (int j=0; j<i; j++) {
newChildren.add((IConstructor) childList.get(j));
}
if ((newChild != child || errorTree) && newChildren == null) {
newChildren = new ArrayList<>(childCount);
for (int j=0; j<i; j++) {
newChildren.add((IConstructor) childList.get(j));
}
}

if (newChildren != null) {
newChildren.add(newChild);
}
}
Expand Down

0 comments on commit e123bdc

Please sign in to comment.