Skip to content

Commit

Permalink
Adds api dep; removes accidental example
Browse files Browse the repository at this point in the history
  • Loading branch information
rchowell committed Jul 7, 2023
1 parent 4c3e880 commit fa1eeee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
30 changes: 0 additions & 30 deletions partiql-ast/src/main/kotlin/org/partiql/ast/Ast.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,3 @@ object Ast : AstBaseFactory()
public abstract class AstBaseFactory : AstFactoryImpl() {
// internal default overrides here
}

public abstract class MyFactory : AstBaseFactory() {

override fun identifierSymbol(symbol: String, caseSensitivity: Identifier.CaseSensitivity): Identifier.Symbol {
return ComparableIdentifier(_id(), symbol, caseSensitivity)
}
}

//
class ComparableIdentifier(
override val _id: String,
override val symbol: String,
override val caseSensitivity: Identifier.CaseSensitivity,
) : Identifier.Symbol {

override fun copy(symbol: String, caseSensitivity: Identifier.CaseSensitivity): Identifier.Symbol {
TODO("Not yet implemented")
}

override val children: List<AstNode> = emptyList()

override fun equals(other: Any?): Boolean {
if (other == null || other !is Identifier.Symbol) return false // different type
if (other === this) return true // same object
return when (caseSensitivity) {
Identifier.CaseSensitivity.SENSITIVE -> this.symbol == other.symbol
Identifier.CaseSensitivity.INSENSITIVE -> this.symbol.lowercase() == other.symbol.lowercase()
}
}
}
2 changes: 1 addition & 1 deletion partiql-lang/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ kotlin {

dependencies {
api(project(":partiql-ast"))
api(project(":partiql-parser"))
api(project(":partiql-spi"))
api(project(":partiql-types"))
api(Deps.ionElement)
api(Deps.ionJava)
api(Deps.ionSchema)
// libs are included in partiql-lang-kotlin JAR, but are not published independently yet.
libs(project(":partiql-parser"))
libs(project(":partiql-plan"))
implementation(Deps.antlrRuntime)
implementation(Deps.csv)
Expand Down

0 comments on commit fa1eeee

Please sign in to comment.