Defines a new TokenParser that will execute sideEffect with the ParseState passed
to it and then return it.
sideEffect is only executed and does not return anything. It is only executed for it's side-effects.
Any side-effects executed may impose performance penalties to the parsing process, thus this functionality
must be used with great care and only in non-critical paths.
It can be used for logging support.
Returns
A new TokenParser that will execute sideEffect and not change the result.
Defines a new TokenParser that will execute
sideEffect
with the ParseState passed to it and then return it.sideEffect
is only executed and does not return anything. It is only executed for it's side-effects.Any side-effects executed may impose performance penalties to the parsing process, thus this functionality must be used with great care and only in non-critical paths.
It can be used for logging support.
Returns
A new TokenParser that will execute
sideEffect
and not change the result.