Interface ITokenRule
- Namespace
- BlazOrbit.SyntaxHighlight.Rules
- Assembly
- BlazOrbit.SyntaxHighlight.dll
Defines a rule for matching tokens during lexical analysis.
public interface ITokenRule
Properties
Priority
Gets the priority of this rule. Higher values are evaluated first.
int Priority { get; }
Property Value
- int
Methods
TryMatch(string, int, TokenizerContext)
Attempts to match a token at the specified position in the input.
TokenMatch? TryMatch(string input, int position, TokenizerContext context)
Parameters
inputstringThe source text.
positionintThe current position in the input.
contextTokenizerContextThe tokenizer context.
Returns
- TokenMatch?
A TokenMatch if successful; otherwise, null.