diff options
| author | 2022-02-25 19:40:00 +0100 | |
|---|---|---|
| committer | 2022-02-25 19:40:00 +0100 | |
| commit | cfaac64c404fb1c2e892880410aa3b7dd881ea58 (patch) | |
| tree | 0dca149e43daaaef41f55fa61375ab361c36a39c /example/streaming-clap.zig | |
| parent | Fix minor typos in README.md (diff) | |
| download | zig-clap-cfaac64c404fb1c2e892880410aa3b7dd881ea58.tar.gz zig-clap-cfaac64c404fb1c2e892880410aa3b7dd881ea58.tar.xz zig-clap-cfaac64c404fb1c2e892880410aa3b7dd881ea58.zip | |
Change clap into generating a struct
This changes
- `.flag`, `.option`, `.options` and `.positionals` are now just fields
you access.
- Move the current `clap.parse` and friends into `clap.untyped.parse`
- This is in preperation for `clap.typed.parse`
Diffstat (limited to '')
| -rw-r--r-- | example/streaming-clap.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/example/streaming-clap.zig b/example/streaming-clap.zig index a7ab7d8..cacda56 100644 --- a/example/streaming-clap.zig +++ b/example/streaming-clap.zig | |||
| @@ -32,7 +32,7 @@ pub fn main() !void { | |||
| 32 | // This is optional. You can also leave the `diagnostic` field unset if you | 32 | // This is optional. You can also leave the `diagnostic` field unset if you |
| 33 | // don't care about the extra information `Diagnostic` provides. | 33 | // don't care about the extra information `Diagnostic` provides. |
| 34 | var diag = clap.Diagnostic{}; | 34 | var diag = clap.Diagnostic{}; |
| 35 | var parser = clap.StreamingClap(u8, process.ArgIterator){ | 35 | var parser = clap.streaming.Clap(u8, process.ArgIterator){ |
| 36 | .params = ¶ms, | 36 | .params = ¶ms, |
| 37 | .iter = &iter, | 37 | .iter = &iter, |
| 38 | .diagnostic = &diag, | 38 | .diagnostic = &diag, |