In This Article

ILexicalState Interface

Provides the base requirements for a lexical state.

public interface ILexicalState : IKeyedObject

Properties

ChildLexicalStates

The collection of child lexical states.

ILexicalStateCollection ChildLexicalStates { get; }

Property Value

ILexicalStateCollection

DefaultTokenId

The ID of the default token that this state assigns.

int DefaultTokenId { get; set; }

Property Value

int

Id

The ID value that identifies the lexical state.

int Id { get; }

Property Value

int

Lexer

The ILexer that contains the state.

ILexer? Lexer { get; }

Property Value

ILexer

LexicalScopes

The collection of lexical scopes.

ILexicalScopeCollection LexicalScopes { get; }

Property Value

ILexicalScopeCollection

Tag

The object that contains user-defined data about the object.

object? Tag { get; set; }

Property Value

object

Transition

The ILexicalStateTransition that is performed immediately after a start scope match.

ILexicalStateTransition? Transition { get; set; }

Property Value

ILexicalStateTransition

Remarks

This provides a mechanism to automatically transition to another language when this state's start scope is matched. This state's end scope may be used to exit the child language.

ASP-style tags are an example of when to use this transition.

Inherited Members

Extension Methods