diff options
| author | 2018-11-14 14:25:42 +0100 | |
|---|---|---|
| committer | 2018-11-14 14:25:42 +0100 | |
| commit | f968d56d96989d1c74664449f509d7d1b2e3010f (patch) | |
| tree | 0b9f51b379af7a80b578d7e0459b680fb926bf0f /src/comptime.zig | |
| parent | Restructured and make StreamingClap simpler (diff) | |
| download | zig-clap-f968d56d96989d1c74664449f509d7d1b2e3010f.tar.gz zig-clap-f968d56d96989d1c74664449f509d7d1b2e3010f.tar.xz zig-clap-f968d56d96989d1c74664449f509d7d1b2e3010f.zip | |
Added pub flag/option/positional init funcs to Param
Diffstat (limited to 'src/comptime.zig')
| -rw-r--r-- | src/comptime.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comptime.zig b/src/comptime.zig index b11dccc..ddcd7e1 100644 --- a/src/comptime.zig +++ b/src/comptime.zig | |||
| @@ -108,19 +108,19 @@ pub fn ComptimeClap(comptime Id: type, comptime params: []const clap.Param(Id)) | |||
| 108 | 108 | ||
| 109 | test "clap.comptime.ComptimeClap" { | 109 | test "clap.comptime.ComptimeClap" { |
| 110 | const Clap = ComptimeClap(void, comptime []clap.Param(void){ | 110 | const Clap = ComptimeClap(void, comptime []clap.Param(void){ |
| 111 | clap.Param(void).init({}, false, clap.Names{ | 111 | clap.Param(void).flag({}, clap.Names{ |
| 112 | .short = 'a', | 112 | .short = 'a', |
| 113 | .long = "aa", | 113 | .long = "aa", |
| 114 | }), | 114 | }), |
| 115 | clap.Param(void).init({}, false, clap.Names{ | 115 | clap.Param(void).flag({}, clap.Names{ |
| 116 | .short = 'b', | 116 | .short = 'b', |
| 117 | .long = "bb", | 117 | .long = "bb", |
| 118 | }), | 118 | }), |
| 119 | clap.Param(void).init({}, true, clap.Names{ | 119 | clap.Param(void).option({}, clap.Names{ |
| 120 | .short = 'c', | 120 | .short = 'c', |
| 121 | .long = "cc", | 121 | .long = "cc", |
| 122 | }), | 122 | }), |
| 123 | clap.Param(void).init({}, true, clap.Names.positional()), | 123 | clap.Param(void).positional({}), |
| 124 | }); | 124 | }); |
| 125 | 125 | ||
| 126 | var buf: [1024]u8 = undefined; | 126 | var buf: [1024]u8 = undefined; |