Sha256: 8d92bba38b7374015fa68567ec6f3162cf609415575ffb7fe0a8068d07567480
Contents?: true
Size: 411 Bytes
Versions: 13
Compression:
Stored size: 411 Bytes
Contents
module Antlr4::Runtime class PredictionContextCache def initialize @cache = {} end def add(ctx) return EmptyPredictionContext::EMPTY if ctx == EmptyPredictionContext::EMPTY existing = @cache[ctx] return existing unless existing.nil? @cache[ctx] = ctx ctx end def get(ctx) @cache[ctx] end def size @cache.size end end end
Version data entries
13 entries across 13 versions & 1 rubygems