// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/asg/Node.java
// public interface Node {
// 
// 	default boolean equalsIgnoringChildren(@Nonnull Node node) {
// 		return node.getClass() == this.getClass();
// 	}
// 
// }


import com.shapesecurity.functional.data.ImmutableList;
import com.shapesecurity.shift.es2017.semantics.asg.Node;
import javax.annotation.Nonnull;
import java.util.Iterator;
package com.shapesecurity.shift.es2017.semantics.visitor;



public final class EqualityChecker {

	private EqualityChecker() {

	}

	public static boolean nodesAreEqual(@Nonnull Node node1, @Nonnull Node node2) {
		if (node1 == node2) {
			return true;
		}
		if (!node1.equalsIgnoringChildren(node2)) {
			return false;
		}
		ImmutableList<Node> nodeList1 = GetDescendents.getDescendants(node1);
		ImmutableList<Node> nodeList2 = GetDescendents.getDescendants(node2);
// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/asg/Node.java
// public interface Node {
// 
// 	default boolean equalsIgnoringChildren(@Nonnull Node node) {
// 		return node.getClass() == this.getClass();
// 	}
// 
// }


// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/visitor/EqualityChecker.java
import com.shapesecurity.functional.data.ImmutableList;
import com.shapesecurity.shift.es2017.semantics.asg.Node;
import javax.annotation.Nonnull;
import java.util.Iterator;

package com.shapesecurity.shift.es2017.semantics.visitor;



public final class EqualityChecker {

	private EqualityChecker() {

	}

	public static boolean nodesAreEqual(@Nonnull Node node1, @Nonnull Node node2) {
		if (node1 == node2) {
			return true;
		}
		if (!node1.equalsIgnoringChildren(node2)) {
			return false;
		}
		ImmutableList<Node> nodeList1 = GetDescendents.getDescendants(node1);
		ImmutableList<Node> nodeList2 = GetDescendents.getDescendants(node2);
		if (nodeList1.length != nodeList2.length) {