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
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
See Also
DeclaringLexicalState
The ILexicalState that declares the pattern that matched the token.
Lexer
The IMergeableLexer that created the token.
LexicalScope
The ILexicalScope, if any, that defines the token.
ILexicalScope? LexicalScope { get; }
Property Value
Remarks
If this value is null, the token was not defined by a lexical scope.
See Also
LexicalState
The ILexicalState that contains the token.
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:
trueif 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
- IToken.Contains(int)
- IToken.Contains(TextPosition)
- IToken.EndOffset
- IToken.EndPosition
- IToken.Id
- IToken.Key
- IToken.Length
- IToken.LexicalStateId
- IToken.PositionRange
- IToken.StartOffset
- IToken.StartPosition
- IToken.TextRange
Extension Methods
- ObjectExtensions.TryConvertToDouble(object, out double)
- ObjectExtensions.TryConvertToDouble(object, IFormatProvider, out double)