Skip to content

Commit

Permalink
Add some more explicit return types
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Jan 31, 2024
1 parent b8f28c2 commit 9262117
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions partiql-ast/src/main/kotlin/org/partiql/ast/sql/SqlDialect.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public abstract class SqlDialect : AstBaseVisitor<SqlBlock, SqlBlock>() {
* @param node
* @param head
*/
public open fun visitExprWrapped(node: Expr, head: SqlBlock) = when (node) {
public open fun visitExprWrapped(node: Expr, head: SqlBlock): SqlBlock = when (node) {
is Expr.SFW -> {
var h = head
h = h concat "("
Expand Down Expand Up @@ -116,11 +116,11 @@ public abstract class SqlDialect : AstBaseVisitor<SqlBlock, SqlBlock>() {
}

// cannot write path step outside the context of a path as we don't want it to reflow
override fun visitPathStep(node: Path.Step, head: SqlBlock) = error("path step cannot be written directly")
override fun visitPathStep(node: Path.Step, head: SqlBlock): SqlBlock = error("path step cannot be written directly")

override fun visitPathStepSymbol(node: Path.Step.Symbol, head: SqlBlock) = visitPathStep(node, head)
override fun visitPathStepSymbol(node: Path.Step.Symbol, head: SqlBlock): SqlBlock = visitPathStep(node, head)

override fun visitPathStepIndex(node: Path.Step.Index, head: SqlBlock) = visitPathStep(node, head)
override fun visitPathStepIndex(node: Path.Step.Index, head: SqlBlock): SqlBlock = visitPathStep(node, head)

// TYPES

Expand Down

0 comments on commit 9262117

Please sign in to comment.