package boa.datagen.util;

import org.eclipse.php.internal.core.ast.nodes.ASTError;
import org.eclipse.php.internal.core.ast.nodes.ASTNode;
import org.eclipse.php.internal.core.ast.visitor.AbstractVisitor;

public class PHPErrorCheckVisitor extends AbstractVisitor{
	public boolean hasError = false;
	
	@Override
	public boolean visit(ASTNode node){
		if ((node.getFlags() & ASTNode.MALFORMED) != 0 || (node.getFlags() & ASTNode.RECOVERED) != 0 || (node instanceof ASTError))
			hasError = true;
		return !hasError;
	}
}

@@ -67,24 +67,17 @@
 t.nodes.
-ASTError
+*
 ;%0Aimport
@@ -191,16 +191,75 @@
 Visitor;
+%0Aimport org.eclipse.php.internal.core.ast.visitor.ApplyAll;
 %0A%0Apublic
@@ -295,30 +295,23 @@
 xtends A
-bstractVisitor
+pplyAll
 %7B%0A%09publi
@@ -340,16 +340,17 @@
 alse;%0A%09%0A
+%0A
 %09@Overri
@@ -354,21 +354,24 @@
 rride%0A%09p
-ublic
+rotected
  boolean
@@ -371,21 +371,21 @@
 boolean 
-visit
+apply
 (ASTNode
@@ -394,16 +394,17 @@
 ode)
+ 
 %7B%0A%09%09if (
 (nod
@@ -399,16 +399,62 @@
 %7B%0A%09%09if (
+node == null %7C%7C (node instanceof ASTError) %7C%7C 
 (node.ge

Use ApplyAll instead of AbstractVisitor