Class ParserStateContext
Provides methods to create ParserStateContext<TChar, T> objects.
public static class ParserStateContext
- Inheritance
-
ParserStateContext
Methods
Create<TChar, T>(IParser<TChar, T>, ParserStateContextOptions?)
Creates a ParserStateContext<TChar, T> from an IParser<TChar, T>.
public static ParserStateContext<TChar, T> Create<TChar, T>(IParser<TChar, T> parser, ParserStateContextOptions? options = null)
Parameters
parser
IParser<TChar, T>The IParser<TChar, T> to use.
options
ParserStateContextOptionsOptions to configure the context. Optional.
Returns
- ParserStateContext<TChar, T>
Type Parameters
TChar
The type of characters that are parsed. Usually it is char or byte (not supported by Farkle's built-in parsers).
T
The type of result the parser produces in case of success.
Exceptions
- ArgumentNullException
parser
is null.