Please complete the following tasks
winnow version
0.7.14
Describe your use case
In many places I have somewhat long call chains on parsers wrapped in trace. The surrounding trace is somewhat unwieldy and gets in the way during reformatting.
Describe the solution you'd like
I would like to be able to call .trace("name") on a parser as an inherent method rather than a standalone function. This transformation would look like this:
/// old
trace("my_parser", my_parser.map(f).context(...));
/// new
my_parser.map(f).context(...).trace("my_parser");
Alternatives, if applicable
Use a custom extension trait or existing the standalone function
Additional Context
I think both forms have their places and should be supported. The postfix could just call the standalone function. Might overlap with #630 a bit.
Please complete the following tasks
winnow version
0.7.14
Describe your use case
In many places I have somewhat long call chains on parsers wrapped in
trace. The surroundingtraceis somewhat unwieldy and gets in the way during reformatting.Describe the solution you'd like
I would like to be able to call
.trace("name")on a parser as an inherent method rather than a standalone function. This transformation would look like this:Alternatives, if applicable
Use a custom extension trait or existing the standalone function
Additional Context
I think both forms have their places and should be supported. The postfix could just call the standalone function. Might overlap with #630 a bit.