An implementation of InverseGenerator that can either swap an argument's
prefix for another, or append a new "generic" prefix if none of the known
swap mappings are present.
Returns a ValueParser that constraints an already-parsed value to some
sequence of acceptable inputs. See ValueParserExtensions.choice for a
slightly more elegant alternative.
An Accumulator for flag arguments that counts the number of times the
argument was true, minus the number of times the argument was false. May
return a value less than 0 if more false values are given than true values.
Returns a ValueParser that will stringify each choice using the given
printer (defaults to toStringValuePrinter()) and returns a value parser
that will map a choice's string to the choice value.
Accumulator<T, U>= U Function({U?previous, requiredTvalue})
A function that takes a newly parsed argument value value and a
potentially existing accumulated value previous and returns a new
accumulated value. In other words, this is very similar to
Iterable.reduce, but designed for Plade.
A "generator" of an inverse argument for a flag. An inverse generator is
given the name of a flag (e.g. for -x it would be x) and should return
a string of its inverse (e.g. no-x), or null if no inverse should be
used.
A function that takes in a string and parses it, returning some result value
of type T. If the value cannot be parsed, a ValueParserException should
be thrown.