Sha256: 880705e6ece3335c331ba614ec270793366a06d37008d5310206ae7c4d154433

Contents?: true

Size: 328 Bytes

Versions: 9

Compression:

Stored size: 328 Bytes

Contents

module Treetop
  module Runtime
    class ParseCache
      attr_reader :node_caches
    
      def initialize
        @node_caches = {}
      end
    
      def [](parsing_expression)
        node_caches[parsing_expression] ||= NodeCache.new
      end
    
      def empty?
        node_caches.empty?
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
treetop-1.1.1 lib/treetop/runtime/parse_cache.rb
treetop-1.1.2 lib/treetop/runtime/parse_cache.rb
treetop-1.0.0 lib/treetop/runtime/parse_cache.rb
treetop-1.0.1 lib/treetop/runtime/parse_cache.rb
treetop-1.0.2 lib/treetop/runtime/parse_cache.rb
treetop-1.1.0 lib/treetop/runtime/parse_cache.rb
treetop-1.2.1 lib/treetop/runtime/parse_cache.rb
treetop-1.2.0 lib/treetop/runtime/parse_cache.rb
treetop-1.1.4 lib/treetop/runtime/parse_cache.rb