示例#1
0
 /// <summary>
 /// Attempts to read one of many strings from the parser and if it succeeds removes the string from the parsers buffer.
 /// </summary>
 /// <param name="parser">A parser on which to operate.</param>
 /// <param name="matched">The actual string that was matched.</param>
 /// <param name="expect">A list of strings to check again, in order.</param>
 /// <returns>True, if the buffer would return <paramref name="expect"/> next, false otherwise.</returns>
 public static bool TryRead(this ITextParser parser, [MaybeNullWhen(false)] out ParserString matched, params object[] expected)
 {
     return(parser.TryRead(out matched, null, expected));
 }