In This Article

IMergeableToken Interface

Represents the base requirements for a mergeable token that has been assigned to a span of text by a mergeable lexer.

public interface IMergeableToken : IToken

Properties

AutoCaseCorrectText

The text that should be used for this IToken when performing an auto case correction operation on it.

string? AutoCaseCorrectText { get; }

Property Value

string

Remarks

Return a null value to indicate that there is no auto case correction text available.

See Also

ClassificationType

The IClassificationType assigned to the token.

IClassificationType? ClassificationType { get; }

Property Value

IClassificationType

See Also

DeclaringLexicalState

The ILexicalState that declares the pattern that matched the token.

ILexicalState? DeclaringLexicalState { get; }

Property Value

ILexicalState

See Also

Lexer

The IMergeableLexer that created the token.

IMergeableLexer? Lexer { get; }

Property Value

IMergeableLexer

See Also

LexicalScope

The ILexicalScope, if any, that defines the token.

ILexicalScope? LexicalScope { get; }

Property Value

ILexicalScope

Remarks

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

See Also

LexicalState

The ILexicalState that contains the token.

ILexicalState? LexicalState { get; }

Property Value

ILexicalState

See Also

Methods

HasFlag(MergeableLexerFlags)

Returns whether the parse data has the specified MergeableLexerFlags flag.

bool HasFlag(MergeableLexerFlags flag)
Parameter Type Description
flag MergeableLexerFlags

The MergeableLexerFlags to check for.

Returns

bool:

true if the parse data has the specified MergeableLexerFlags flag; otherwise, false.

See Also

SetFlag(MergeableLexerFlags, bool)

Sets or clears the specified MergeableLexerFlags flag.

void SetFlag(MergeableLexerFlags flag, bool setBit)
Parameter Type Description
flag MergeableLexerFlags

The MergeableLexerFlags to set or clear.

setBit bool

Whether to set the flag; otherwise, the flag is cleared.

Remarks

This method should only be called by lexers.

See Also

Inherited Members

Extension Methods

See Also