Skip to content

TokenCache

[<Class>]
type TokenCache =
    new (capacity: int) : TokenCache
    member Enabled: bool with get, set
    member Hits: int64
    member Misses: int64
    member Reset () : unit
    member Tokens (language': Language) (line: string) : Token array
AssemblyRanvier.Plume
Attributes[<Sealed>]

The tokens of the lines of one language, kept by line text. A line that occurs again costs a lookup; when the cache holds capacity lines it starts again empty.

Constructors

new (capacity: int) : TokenCache

Properties

member Enabled: bool with get, set

False to tokenize every line asked for.

member Hits: int64
member Misses: int64

Methods

member Reset () : unit

Empties the cache and its counts.

member Tokens (language': Language) (line: string) : Token array

The tokens of line in language.