Parses text.
public IParseResult<T> TryParse(TextPosition position)
Parses text.
public abstract T TryParse(bool skip, ref TextPosition position, out bool success)
parameter | description |
---|---|
skip | True if the parsed value will not be used. |
position | The position in the text where parsing starts and finishes. |
success | True if parsing was successful. |
The parsed value, or default
if parsing failed.
The odd signature allows IParser
to be covariant on T
. Call the TryParse
and Parse
extension methods on Parser
when actually parsing text.