Represents the default implementation of an IToken that can be used with an IMergable
- Implements:
-
IMergable
Token IToken
Constructors
MergableToken(int, int, TextPosition, TextPosition, MergableLexerFlags, ILexicalState, IMergableTokenLexerData)
Initializes a new instance of the MergableToken
class.
Parameter | Type | Description |
---|---|---|
startOffset | int | The start offset of the token. |
length | int | The length of the token. |
startPosition | Text |
The Text |
endPosition | Text |
The Text |
lexerFlags | Mergable |
The Mergable |
lexicalState | ILexical |
The ILexical |
lexerData | IMergable |
The IMergable |
Properties
AutoCaseCorrectText
Gets the text that should be used for this IToken when performing an auto case correction operation on it.
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 IClassification
Property Value
- IClassification
Type : The IClassification
Type assigned to the token.
DeclaringLexicalState
Gets the ILexical
Property Value
- ILexical
State : The ILexical
State that declares the pattern that matched the token.
Id
Gets the ID assigned to the token.
Property Value
- int:
The ID assigned to the token.
Key
Gets the key assigned to the token.
Property Value
- string:
The key assigned to the token.
Lexer
Gets the IMergable
Property Value
- IMergable
Lexer : The IMergable
Lexer that created the token.
LexerData
Gets an IMergable
Property Value
- IMergable
Token :Lexer Data An IMergable
Token that contains lexer information for the token.Lexer Data
LexerFlags
Gets a Mergable
Property Value
- Mergable
Lexer :Flags A Mergable
Lexer indicating lexer flags for the token.Flags
LexicalScope
Gets the ILexical
Property Value
- ILexical
Scope : The ILexical
Scope , if any, that defines the token.
Remarks
If this value is null
, the token was not defined by a lexical scope.
LexicalState
Gets the ILexical
Property Value
- ILexical
State : The ILexical
State that contains the token.
LexicalStateId
Gets the ID assigned to the lexical state.
Property Value
- int:
The ID assigned to the lexical state.
Methods
HasFlag(MergableLexerFlags)
Returns whether the parse data has the specified Mergable
Parameter | Type | Description |
---|---|---|
flag | Mergable |
The Mergable |
Returns
- bool:
true
if the parse data has the specified MergableLexer flag; otherwise,Flags false
.
SetFlag(MergableLexerFlags, bool)
Sets or clears the specified Mergable
Parameter | Type | Description |
---|---|---|
flag | Mergable |
The Mergable |
setBit | bool | Whether to set the flag; otherwise, the flag is cleared. |
Remarks
This method should only be called by lexers.
Inherited Members
-
Token
Base. Contains(int) -
Token
Base. Contains(Text Position) -
Token
Base. Equals(object) -
Token
Base. Get Hash Code() -
Token
Base. To String() -
Token
Base. To String(string) -
Token
Base. End Offset -
Token
Base. End Position -
Token
Base. Length -
Token
Base. Position Range -
Token
Base. Start Offset -
Token
Base. Start Position -
Token
Base. Text Range -
object.
Get Type() -
object.
Memberwise Clone() -
object.
Equals(object, object) -
object.
Reference Equals(object, object)