Exemple #1
0
 /// <summary>
 /// Cache result values of this parser so on the next call to Parse from the same location
 /// an existing result value can be used.
 /// </summary>
 /// <typeparam name="TInput"></typeparam>
 /// <typeparam name="TOutput"></typeparam>
 /// <param name="p"></param>
 /// <returns></returns>
 public static IMultiParser <TInput, TOutput> Cache <TInput, TOutput>(this IMultiParser <TInput, TOutput> p)
 => ParserMethods <TInput> .Cache(p);
 /// <summary>
 /// Cache the output of the given parser so that the next call to .Parse at the same
 /// location will return the existing result. Useful when the parser is particularly
 /// expensive to execute and likely to be executed multiple times.
 /// </summary>
 /// <typeparam name="TInput"></typeparam>
 /// <param name="p"></param>
 /// <returns></returns>
 public static IParser <TInput> Cache <TInput>(this IParser <TInput> p)
 => ParserMethods <TInput> .Cache(p);