Table of Contents

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

input string

The source text.

position int

The current position in the input.

context TokenizerContext

The tokenizer context.

Returns

TokenMatch?

A TokenMatch if successful; otherwise, null.