In This Article

IMergableToken Interface

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

public interface IMergableToken : IToken

Properties

AutoCaseCorrectText

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

string AutoCaseCorrectText { get; }

Property Value

String:

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

Remarks

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

ClassificationType

Gets the IClassificationType assigned to the token.

IClassificationType ClassificationType { get; }

Property Value

IClassificationType:

The IClassificationType assigned to the token.

DeclaringLexicalState

Gets the ILexicalState that declares the pattern that matched the token.

ILexicalState DeclaringLexicalState { get; }

Property Value

ILexicalState:

The ILexicalState that declares the pattern that matched the token.

Lexer

Gets the IMergableLexer that created the token.

IMergableLexer Lexer { get; }

Property Value

IMergableLexer:

The IMergableLexer that created the token.

LexicalScope

Gets the ILexicalScope, if any, that defines the token.

ILexicalScope LexicalScope { get; }

Property Value

ILexicalScope:

The ILexicalScope, if any, that defines the token.

Remarks

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

LexicalState

Gets the ILexicalState that contains the token.

ILexicalState LexicalState { get; }

Property Value

ILexicalState:

The ILexicalState that contains the token.

Methods

HasFlag(MergableLexerFlags)

Returns whether the parse data has the specified MergableLexerFlags flag.

bool HasFlag(MergableLexerFlags flag)
Parameter Type Description
flag MergableLexerFlags

The MergableLexerFlags to check for.

Returns

Boolean:

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

SetFlag(MergableLexerFlags, Boolean)

Sets or clears the specified MergableLexerFlags flag.

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

The MergableLexerFlags to set or clear.

setBit Boolean

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

Remarks

This method should only be called by lexers.

Inherited Members

See Also