All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.edurt.datacap.parser.mysql.companion.ast.Node.kt Maven / Gradle / Ivy

There is a newer version: 2024.3.11
Show newest version
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