mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibCore: Allow ArgsParser::parse() to not exit on failure
This allows its use in places where multiple calls to ArgsParser::parse() are needed, such as Shell builtins.
This commit is contained in:
parent
16ba0b39f3
commit
1c4f38749e
Notes:
sideshowbarker
2024-07-19 06:34:56 +09:00
Author: https://github.com/alimpfard
Commit: 1c4f38749e
Pull-request: https://github.com/SerenityOS/serenity/pull/2241
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bugaevc
2 changed files with 18 additions and 6 deletions
|
@ -66,7 +66,7 @@ public:
|
|||
Function<bool(const char*)> accept_value;
|
||||
};
|
||||
|
||||
void parse(int argc, char** argv);
|
||||
bool parse(int argc, char** argv, bool exit_on_failure = true);
|
||||
void print_usage(FILE*, const char* argv0);
|
||||
|
||||
void add_option(Option&&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue