Class: Factbase::Syntax
- Inherits:
-
Object
- Object
- Factbase::Syntax
- Defined in:
- lib/factbase/syntax.rb
Overview
Syntax.
This is an internal class, it is not supposed to be instantiated directly.
- Author
-
Yegor Bugayenko ([email protected])
- Copyright
-
Copyright © 2024 Yegor Bugayenko
- License
-
MIT
Instance Method Summary collapse
-
#initialize(query, term: Factbase::Term) ⇒ Syntax
constructor
Ctor.
-
#to_term ⇒ Term
Convert it to a term.
Constructor Details
Instance Method Details
#to_term ⇒ Term
Convert it to a term.
46 47 48 49 50 51 52 |
# File 'lib/factbase/syntax.rb', line 46 def to_term build.simplify rescue StandardError => e err = "#{e.} in \"#{@query}\"" err = "#{err}, tokens: #{@tokens}" unless @tokens.nil? raise err end |