Class TextParser
TextParser which can be used to parse a text into tokens.
Inherited Members
Namespace: System.Linq.Dynamic.Core.Tokenizer
Assembly: System.Linq.Dynamic.Core.dll
Syntax
public class TextParser
Constructors
| Improve this Doc View SourceTextParser(ParsingConfig, String)
Constructor for TextParser
Declaration
public TextParser(ParsingConfig config, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| ParsingConfig | config | |
| String | text |
Fields
| Improve this Doc View SourceCurrentToken
The current parsed Token.
Declaration
public Token CurrentToken
Field Value
| Type | Description |
|---|---|
| Token |
Methods
| Improve this Doc View SourceNextToken()
Go to the next token.
Declaration
public void NextToken()
PeekNextChar()
Peek the next character.
Declaration
public char PeekNextChar()
Returns
| Type | Description |
|---|---|
| Char | The next character, or \0 if end of string. |
ValidateToken(TokenId, String)
Check if the current token is the specified TokenId.
Declaration
public void ValidateToken(TokenId tokenId, string errorMessage = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TokenId | tokenId | The tokenId to check. |
| String | errorMessage | The (optional) error message. |