TokenIdProviderBase Class
Represents an abstract base class for an object that provides static IDs for the tokens of an ISyntaxLanguage.
public abstract class TokenIdProviderBase : ITokenIdProvider, IIdProvider
- Inheritance:
- object object
- Implements:
- ITokenIdProvider IIdProvider
Constructors
TokenIdProviderBase()
Initializes an instance of the class.
protected TokenIdProviderBase()
Properties
MaxId
Gets the maximum ID returned by this provider.
MinId
Gets the minimum ID returned by this provider.
Methods
ContainsId(int)
Returns whether the specified ID value is valid for this ID provider.
public abstract bool ContainsId(int id)
Parameter | Type | Description |
---|---|---|
id | int | The ID to examine. |
Returns
- bool:
true
if the ID value is valid; otherwise,false
GetDescription(int)
Returns the actual string representation for the specified ID.
public abstract string GetDescription(int id)
Parameter | Type | Description |
---|---|---|
id | int | The ID to examine. |
Returns
- string:
The actual string representation for the specified ID.
GetKey(int)
Returns the string-based key for the specified ID.
public abstract string GetKey(int id)
Parameter | Type | Description |
---|---|---|
id | int | The ID to examine. |
Returns
- string:
The string-based key for the specified ID.
Fields
DocumentEnd
Gets the DocumentEnd
token ID, which is common among all languages.
public const int DocumentEnd = -1
Invalid
Gets the Invalid
token ID, which is common among all languages.
public const int Invalid = -2