Skip to content

Commit

Permalink
Fix some tags having children they shouldn't have
Browse files Browse the repository at this point in the history
  • Loading branch information
RA-Kooi committed Dec 31, 2021
1 parent 632e51f commit 404bb4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DwarfOne2C/Parsing/CompilationUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ public void FirstPass(string[] lines, int current)
IDToIndex.Add(ID, allTags.Count - 1);

// If prev->sibling != ID
if(allTags[allTags.Count - 2].sibling != ID)
int prevSibling = allTags[allTags.Count - 2].sibling;

if(prevSibling != ID && prevSibling != sibling)
allTags[allTags.Count - 2].firstChild = ID;
}

Expand Down

0 comments on commit 404bb4f

Please sign in to comment.