* add initial traits for GAT integration
The Mode trait will be used to adapt the production of output or error
values depending on the call site. If we do not care about the actual
value or error, and just want to know if a parser was succssful or not,
then the Mode trait allows us to signal it without producng the actual
type.
in Err, the Error and Failure variants get different types, because
usually want to get the failure variant, while the error variant might
change independently.
The OutputMode trait also carries information about the streaming or
complete status, and in the same way define which type of parser we
want, directly at the call site
* convert the Parser trait
a new `process` method is used to handle the new OutputMode trait.
The `OutputM` supporting structure is used to carry which modes we want
to use, and depending on the case, we can call an inner parser using
directly the mode we're in (example: Map), or we can convert it to Emit
for Output (ex: MapRes because we have to apply the mapping function on
the parser output and check for errors).
We keep the `parse` method with `Emit` for both output and error, which
allows us to convert combinators gradually: the ones using `parse` will
work but won't benefit directly from these traits also parent and child
combinators in a serie of parsers may support it
* various optimizations
it turns out that rustc is generating separate functions for each
process() implementation, which tends to slow things down
* raise minimal version to 1.65
I'm looking at extending the docs and want to make sure I don't
introduce a bad link.
It looks like
- CI won't fail on bad intradoc links
- We can't get it to with the `cargo` action
So dropping down to the shell to make sure bad links error, instead of
warn.
minimal-lexical is a smaller library (compile faster), has no
dependencies, and is faster than lexical-core 0.7 (0.8 will have the
same algorithm).
It requires a separate tokenization phase, done manually, but this will
give more flexibility in supporting different syntaxes
This commit removes the "lexical" feature, as there is no need now
tosupport a separate version without the crate