Sha256: 66fa2626a4c346cb975570cbc54ed27f09a9eccc3da0f451723d4672f315c801
Contents?: true
Size: 486 Bytes
Versions: 6
Compression:
Stored size: 486 Bytes
Contents
require "search_cop_grammar" require "treetop" Treetop.load File.expand_path("../search_cop_grammar.treetop", __dir__) module SearchCop class GrammarParser attr_reader :query_info def initialize(query_info) @query_info = query_info end def parse(string, query_options) node = SearchCopGrammarParser.new.parse(string) || raise(ParseError) node.query_info = query_info node.query_options = query_options node.evaluate end end end
Version data entries
6 entries across 6 versions & 1 rubygems