Method: Factbase::Syntax#to_term
- Defined in:
- lib/factbase/syntax.rb
#to_term ⇒ Term
Convert it to a term.
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/factbase/syntax.rb', line 36 def to_term @to_term ||= begin t = build t = t.simplify if t.respond_to?(:simplify) t end rescue StandardError => e err = "#{e.message} (#{Backtrace.new(e)}) in \"#{@query}\"" err = "#{err}, tokens: #{@tokens}" unless @tokens.nil? raise Broken, err end |