PredictionContextCache class

Used to cache PredictionContext objects. Its used for the shared context cash associated with contexts in DFA states. This cache can be used for both lexers and parsers.

Constructors

PredictionContextCache()

Properties

cache Map<PredictionContext, PredictionContext>
final
hashCode int
The hash code for this object.
no setterinherited
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(PredictionContext ctx) PredictionContext
Add a context to the cache and return it. If the context already exists, return that one instead and do not add a new context to the cache. Protect shared cache from unsafe thread access.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](PredictionContext ctx) PredictionContext?