[m-rev.] for review: changes to option handling
Peter Wang
novalazy at gmail.com
Fri Sep 18 13:03:08 AEST 2020
On Fri, 18 Sep 2020 01:19:22 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
> 2020-09-17 18:03 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
> >> + % process_options_cookie(OptionOps, Args, OptionArgs, NonOptionArgs,
> >> + % OptionTable0, Result, OptionsSet, !Cookie, !IO):
> >> + %
> >> + % This predicate is similar to process_options_track, but it also
> >> + % threads a piece of state of a user-specified "cookie" type through
> >> + % all the handlers of special options, so that each special handler
> >> + % can read from and/or write to this state. Amongst other things,
> >> + % this can be used by the caller to recover the *sequence* in which
> >> + % special options are specified, information that is not present
> >> + % in the (orderless) set of specified options.
> >> + %
> >> + % XXX Should we return the final value of CookieType
> >> + % if the value we return for Result is error(...)?
> >
> > I say yes.
>
> In that case, if there is an error, should the new predicates return
> the option table as well, as it was just before the error?
Yes, I could see a use for that.
Peter
More information about the reviews
mailing list