In This Article

LexicalStateTokenData Class

Provides IToken lexer data based on a token ID and on an ILexicalState.

public class LexicalStateTokenData : IMergeableTokenLexerData
Inheritance:
object object
Implements:
IMergeableTokenLexerData

Constructors

LexicalStateTokenData(ILexicalState, int)

Provides IToken lexer data based on a token ID and on an ILexicalState.

public LexicalStateTokenData(ILexicalState lexicalState, int tokenId)
Parameter Type Description
lexicalState ILexicalState

The ILexicalState that contains the token.

tokenId int

The ID of the token.

Properties

ClassificationType

The IClassificationType assigned to the token.

public IClassificationType? ClassificationType { get; }

Property Value

IClassificationType

Lexer

The IMergeableLexer that created the token.

public IMergeableLexer? Lexer { get; }

Property Value

IMergeableLexer

LexicalScope

The ILexicalScope, if any, that defines the token.

public ILexicalScope? LexicalScope { get; }

Property Value

ILexicalScope

Remarks

If this value is null, the token was not defined by a lexical scope.

LexicalState

The ILexicalState that contains the token.

public ILexicalState? LexicalState { get; }

Property Value

ILexicalState

TokenId

The token ID assigned to the token.

public int TokenId { get; }

Property Value

int

TokenKey

The token key assigned to the token, if it is known.

public virtual string? TokenKey { get; }

Property Value

string

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

Inherited Members

Extension Methods