Interface IParserStateContextFactory<TChar, T>
Provides an extensibility point for IParser<TChar, T>s to create custom ParserStateContext<TChar, T>s.
public interface IParserStateContextFactory<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.
Remarks
This is a service interface meant to be returned from GetService(Type). User code does not need to bother with it; it is automatically considered by Create<TChar, T>(IParser<TChar, T>, ParserStateContextOptions?).
Methods
CreateContext(ParserStateContextOptions?)
Creates a ParserStateContext<TChar, T>.
ParserStateContext<TChar, T> CreateContext(ParserStateContextOptions? options = null)
Parameters
options
ParserStateContextOptionsOptions to configure the context. Optional.
Returns
- ParserStateContext<TChar, T>