Skip to content

Commit

Permalink
Allowr Call as a root expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Txus committed Oct 10, 2022
1 parent 0b75894 commit 6b679be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
fql (0.2.2)
fql (0.2.3)
activerecord (~> 6.0)
i18n (~> 1.8)
sorbet-rails (~> 0.7.3)
Expand Down
4 changes: 2 additions & 2 deletions lib/fql/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module FQL
class Query
extend T::Sig

sig { params(expr: DSL::BoolExpr, library: Library).void }
sig { params(expr: DSL::Root, library: Library).void }
def initialize(expr, library: Library.empty)
@expr = expr
@library = library
Expand Down Expand Up @@ -64,7 +64,7 @@ def not
self.class.new(DSL::Not.new(expr: expr))
end

sig { returns(DSL::BoolExpr) }
sig { returns(DSL::Root) }
attr_reader :expr

private
Expand Down
2 changes: 2 additions & 0 deletions lib/fql/query/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class Call < T::Struct

Expr = T.type_alias { T.any(BoolExpr, ValueExpr) }

Root = T.type_alias { T.any(BoolExpr, Call) }

# Determine equality between two values.
class Eq < T::Struct
include Node
Expand Down
2 changes: 1 addition & 1 deletion lib/fql/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: false
module FQL
VERSION = "0.2.2".freeze
VERSION = "0.2.3".freeze
end

0 comments on commit 6b679be

Please sign in to comment.