- takeWhileP<TToken, TOptions, TValue>(pValue: Parser<TToken, TOptions, TValue>, pTest: Parser<TToken, TOptions, unknown>): Matcher<TToken, TOptions, TValue[]>
-
Parameters
-
pValue: Parser<TToken, TOptions, TValue>
-
pTest: Parser<TToken, TOptions, unknown>
Returns Matcher<TToken, TOptions, TValue[]>
Make a Matcher that returns all (0 or more) sequential matches of the first parser while the second parser also matches.
Use takeWhile if the stop condition is based on the parsed value.
Implementation is based on takeWhile.