Page MenuHomePhabricator

Segregate the Python class + key/value dictionary into a separate OptionGroup
ClosedPublic

Authored by jingham on Oct 2 2019, 5:34 PM.

Details

Summary

I want to reuse these options (break set's -P -k -v) in another command (thread step-scripted) in a future commit, so I broke them off into their own OptionGroup. I made the short options settable because you can never tell whether there's going to be the same three open slots in every command. For instance, "thread step-scripted" uses -C not -P, which will be more correct if/when we have another script interpreter. But -C was already taken for "break set"...

I added some tests for the parsing of these options. In the course of adding those tests I discovered that if an OptionGroup returns an error, and the option is not the last option in the line, the error is ignored. I fixed that as well - that's the change to Options.cpp

Event Timeline

jingham created this revision.Oct 2 2019, 5:34 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 3 2019, 3:18 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2019, 3:18 PM