clap/src
Ed Page 263fe30568 feat: Usage parser macro
This is intended to replace the runtime usage parser and is not meant to
be a complete API in of itself, like `clap_app!`.  What is in scope is
everything that visually makes sense as in a usage string (see
[docopt](http://docopt.org/) for inspiration).  General setting of
attributes is out of scope.

This deviates from both `clap_app` and the runtime usage parser
- `clap_app` supported multiple values but has a bug because we made
  `Arg::value_name` non-appending, so we aren't supporting this yet
- We do not yet support optional flags that take a value
- In both, `...` is multiple occurrences and values while its only
  multiple occurrences for us
- We explicitly support optional values for flags
- Unlike `clap_app`, our name is optional
- Unlike runtime usage parser, our name syntax is simpler
- Unlike runtime usage parser, our name syntax does not allow modifiers

Its more limited than I would like.  Hopefully some people better with
macros can expand the feature set and turn more runtime errors into
compile-time errors.

This is to prepare for deprecating the runtime usage parser (#8).
2021-11-22 16:21:09 -06:00
..
build fix: Arg::default has correct display order 2021-11-22 16:17:46 -06:00
output fix: Arg::default has correct display order 2021-11-22 16:17:46 -06:00
parse Revert rename of from_yaml / from_usage 2021-11-22 16:17:46 -06:00
util refactor(error): Delay formatting until the end 2021-10-26 14:26:50 -05:00
derive.rs Revert "Deprecate Arg::help in favour of Arg::about" 2021-11-18 12:25:49 -06:00
lib.rs fix: Deprecate YAML API 2021-11-22 16:17:46 -06:00
macros.rs feat: Usage parser macro 2021-11-22 16:21:09 -06:00
mkeymap.rs perf: Reduce allocations on 'args' 2021-10-18 16:14:31 -05:00