* A visitor that comparares two Js AST trees and fails if they are different.
*/
public class ComparingVisitor extends JsVisitor {
public static void exec(List<JsStatement> expected, List<JsStatement> actual) {
TreeNode expectedTree = FlatteningVisitor.exec(expected);
TreeNode actualTree = FlatteningVisitor.exec(actual);
compare(expectedTree, actualTree);
}