diff --git a/src/java/me/topchetoeu/jscript/compilation/Path.java b/src/java/me/topchetoeu/jscript/compilation/Path.java deleted file mode 100644 index 9d5f897..0000000 --- a/src/java/me/topchetoeu/jscript/compilation/Path.java +++ /dev/null @@ -1,29 +0,0 @@ -package me.topchetoeu.jscript.compilation; - -import java.util.function.Predicate; - -public class Path { - public final Path parent; - public final Node node; - - public Path getParent(Predicate> predicate) { - for (Path it = this; it != null; it = it.parent) { - if (predicate.test(it)) return it; - } - - return null; - } - - public Path getParent(Class type, Predicate> predicate) { - for (Path it = this; it != null; it = it.parent) { - if (type.isInstance(it.node) && predicate.test(it)) return it; - } - - return null; - } - - public Path(Path parent, Node node) { - this.parent = parent; - this.node = node; - } -}