io.edurt.datacap.parser.mysql.companion.ast.Node.kt Maven / Gradle / Ivy
package io.edurt.datacap.parser.mysql.companion.ast
import io.edurt.datacap.parser.mysql.companion.AstVisitor
import java.util.*
abstract class Node(location: Optional) {
open val location: Optional = Objects.requireNonNull(location, "location is null")
protected open fun sameClass(left: Node, right: Node): Boolean {
if (left == right) {
return true
}
return left.javaClass == right.javaClass
}
open fun accept(visitor: AstVisitor, context: C): R? {
return visitor.visitNode(this, context)
}
protected open fun shallowEquals(other: Node): Boolean {
throw UnsupportedOperationException("not yet implemented: " + javaClass.name)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy