package core.arg_parse
arg_parse :: (c_args: [] [&] u8, output: any) -> bool
arg_parse :: (args: [] [] u8, output: any) -> bool
This is currently a very basic argument parsing library. The options are given through a structure like so:
Options :: struct {
@"--option_1"
option_1: str;
@"--option_2", "-o2"
option_2: bool;
}
main :: (args) => {
o: Options;
arg_parse.arg_parse(args, &o);
}
Options that are strings and integers expect an argument after them to specify their value. Options that are bool default to false and are true if one or more of the option values are present.