ILexer Interface
Provides the base requirements of a lexer (lexical analyzer) for a language.
public interface ILexer : IKeyedObject
Remarks
This interface type can be registered with an ISyntaxLanguage using the RegisterService(Object, Object) method. Once an object that implements this interface is registered with the language for this interface type, its features can be used by the language.
Properties
TokenIdProvider
Gets the ITokenIdProvider that provides access to all the token IDs and keys used by this lexer.
ITokenIdProvider TokenIdProvider { get; }
Property Value
- ITokenIdProvider:
The ITokenIdProvider that provides access to all the token IDs and keys used by this lexer.
Methods
Parse(TextSnapshotRange, ILexerTarget)
Lexically parses the specified TextRange of the ITextSnapshot.
TextRange Parse(TextSnapshotRange snapshotRange, ILexerTarget parseTarget)
Parameter | Type | Description |
---|---|---|
snapshotRange | TextSnapshotRange | A TextSnapshotRange indicating the offset range to parse. |
parseTarget | ILexerTarget | The ILexerTarget that receives the parsing output. |