TokenDictionary<TValue, TLiteral, TRune>

Namespace: SnowBank.Buffers · class

Dictionary that can look up tokens either via their TLiteral representation (ex: string), or via their representation as a ReadOnlySpan (ex: ReadOnlySpan<char>)

Properties

Count

int Count { get; }

Methods

Add

void Add(in ReadOnlyMemory<TRune> literal, TValue value)

ContainsKey

bool ContainsKey(in ReadOnlySpan<TRune> token)

bool ContainsKey(in ReadOnlyMemory<TRune> token)

TryGetValue

bool TryGetValue(in ReadOnlySpan<TRune> token, out TValue value)

bool TryGetValue(in ReadOnlyMemory<TRune> token, out TValue value)