[m-rev.] for review: "Did you mean ..." mesages for long options
Julien Fischer
jfischer at opturion.com
Sat Apr 20 00:30:28 AEST 2024
In the absence of a review, I intend to commit this one over
the weekend.
Julien.
On Sat, 6 Apr 2024, Julien Fischer wrote:
>
> "Did you mean ..." messages for long options.
>
> Generate "Did you mean ..." messages for unrecognized long options.
> For example:
>
> unrecognized option `--no-half-at-wrn'.
> (Did you mean `--no-halt-at-warn'?)
>
> compiler/mercury_compile_main.m:
> If we have an unrecognized long option or negated long option,
> then attempt to generate a "Did you mean ..." message for it.
>
> compiler/error_spec.m:
> Add a version of maybe_construct_did_you_mean_pieces that lets
> you add prefix to the strings before including them in the pieces.
> This is required for handling the "--" and "--no-" long option
> prefixes. Both versions of maybe_construct_did_you_mean pieces
> are implemented using the same underlying piece of code.
>
> compiler/options.m:
> Add predicates for returning the set of all long options and all
> negatable
> long options. To make this possible, shift the long option table into a
> new predicate and add an (out, out) is multi mode for it.
>
> library/getopt.m:
> Update the documentation to include maybe_string_special options
> among the option types that are negatable.
...
More information about the reviews
mailing list