diff --git a/Parser/spec/Helpers.jadd b/Parser/spec/Helpers.jadd index a147c4b4caed0bb36b1d108deb12255f2db3698e..64e6b253ae8fc4f1193cb7e118e0768c584e587b 100644 --- a/Parser/spec/Helpers.jadd +++ b/Parser/spec/Helpers.jadd @@ -1,22 +1,21 @@ aspect Helpers { - public void ASTNode.checkTreeStructure() { - for (ASTNode child : astChildren()) { - if (child.getParent() != this) { - throw new RuntimeException(); - } - child.checkTreeStructure(); - } + public void ASTNode.checkTreeStructure() { + for (ASTNode child : this.astChildren()) { + if (child.getParent() != this) { + throw new RuntimeException(); + } + child.checkTreeStructure(); } + } - public void ASTNode.fixTreeStructure() { - for (ASTNode child : astChildren()) { - if (child.getParent() != this) { - // System.err.println("fixed parent of " + child); - child.parent = this; - } - child.fixTreeStructure(); - } + public void ASTNode.fixTreeStructure() { + for (ASTNode child : this.astChildren()) { + if (child.getParent() != this) { + child.parent = this; + } + child.fixTreeStructure(); } + } }