Class TokenizerContext
- Namespace
- BlazOrbit.SyntaxHighlight.Rules
- Assembly
- BlazOrbit.SyntaxHighlight.dll
Provides contextual state for the tokenizer.
public class TokenizerContext
- Inheritance
-
objectTokenizerContext
Constructors
TokenizerContext()
public TokenizerContext()
Properties
CaseSensitive
Gets a value indicating whether token matching is case-sensitive.
public bool CaseSensitive { get; init; }
Property Value
- bool
CurrentState
Gets the current state from the top of the state stack, or null if empty.
public string? CurrentState { get; }
Property Value
- string
LanguageName
Gets the name of the language being tokenized.
public string LanguageName { get; init; }
Property Value
- string
StateStack
Gets the stack of tokenizer states.
public Stack<string> StateStack { get; }
Property Value
- Stack<string>
Methods
PopState()
Pops the top state from the state stack.
public void PopState()
PushState(string)
Pushes a state onto the state stack.
public void PushState(string state)
Parameters
statestringThe state to push.