Class SyntaxTokenDefinition
A base class for classes that define logic for reading specific kinds of tokens from a string
Inheritance
Inherited Members
Namespace: CilTools.Syntax.Tokens
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public abstract class SyntaxTokenDefinition
Remarks
Derived classes could use PeekChar() to check the next character at the reader's current position, but should not advance the reader's position by reading characters from it.
Constructors
SyntaxTokenDefinition()
Declaration
protected SyntaxTokenDefinition()
Properties
IlasmTokens
Provides a collection of token definitions for the CIL assembler grammar (ECMA-335 II.5.2 - Basic syntax categories).
Declaration
public static IEnumerable<SyntaxTokenDefinition> IlasmTokens { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SyntaxTokenDefinition> |
Methods
HasContinuation(String, TokenReader)
Gets a value indicating whether the current position of the TokenReader contains a sequence of characters valid as a continuation of the specified token
Declaration
public abstract bool HasContinuation(string prevPart, TokenReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.String | prevPart | A part of token previously read from a token reader |
TokenReader | reader | A token reader to test |
Returns
Type | Description |
---|---|
System.Boolean |
HasStart(TokenReader)
Gets a value indicating whether the current position of the TokenReader contains a sequence of characters valid as the token start
Declaration
public abstract bool HasStart(TokenReader reader)
Parameters
Type | Name | Description |
---|---|---|
TokenReader | reader | A token reader to test |
Returns
Type | Description |
---|---|
System.Boolean |