Method OnMatch
OnMatch<T>(Parser<T>, Action<IResult<T>>)
Parser combinator to provide semantic action support for matched parsers
Declaration
public static Parser<T> OnMatch<T>(this Parser<T> parser, Action<IResult<T>> action)
Parameters
public static Parser<T> OnMatch<T>(this Parser<T> parser, Action<IResult<T>> action)
Sprache.Parser<T> | parser | parser to process the input sequence and, if matched, run |
System.Action<Sprache.IResult<T>> | action | action to run if the parser matches the input |
Returns
Sprache.Parser<T> | New parser that will pass the input through |
Type Parameters
T | Type of elements the parser produces |