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