Skip to content

Instantly share code, notes, and snippets.

@bkyrlach
Created August 31, 2020 23:28
Show Gist options
  • Save bkyrlach/4f2683902e81d1b9d46887553d01f061 to your computer and use it in GitHub Desktop.
Save bkyrlach/4f2683902e81d1b9d46887553d01f061 to your computer and use it in GitHub Desktop.
sealed trait AST
case class Query(selectClause: List[ColumnExp], ...) extends AST
sealed trait Exp extends AST
sealed trait QIdent extends Exp
case class QIdentBase(name: String) extends QIdent
case class QIdentDot(qualifier: QIdent, name: QIdentBase) extends QIdent
case class BinOp(left: Exp, right: Exp, op: Char) extends AST
case class ColumnExp(colVal: Exp, name: QIdentBase) extends AST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment