diff options
| author | 2018-03-22 15:53:29 +0100 | |
|---|---|---|
| committer | 2018-03-22 15:53:29 +0100 | |
| commit | 659b1ef903f7b14949b9c8231bce228bf6ad2e31 (patch) | |
| tree | afe8f8075577eae6122607590f482193ffaad588 | |
| parent | Major refactor of clap (diff) | |
| download | zig-clap-659b1ef903f7b14949b9c8231bce228bf6ad2e31.tar.gz zig-clap-659b1ef903f7b14949b9c8231bce228bf6ad2e31.tar.xz zig-clap-659b1ef903f7b14949b9c8231bce228bf6ad2e31.zip | |
Fixed compiler errors
Diffstat (limited to '')
| -rw-r--r-- | clap.zig | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -51,9 +51,9 @@ pub fn Clap(comptime Result: type) type { | |||
| 51 | return res; | 51 | return res; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | pub fn version(builder: &const Builder, version: []const u8) Builder { | 54 | pub fn version(builder: &const Builder, version_str: []const u8) Builder { |
| 55 | var res = *builder; | 55 | var res = *builder; |
| 56 | res.result.author = version; | 56 | res.result.author = version_str; |
| 57 | return res; | 57 | return res; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| @@ -267,7 +267,7 @@ pub const Command = struct { | |||
| 267 | return error.CannotParseStringAsBool; | 267 | return error.CannotParseStringAsBool; |
| 268 | }, | 268 | }, |
| 269 | TypeId.Int, TypeId.IntLiteral => return fmt.parseInt(Result, str, 10), | 269 | TypeId.Int, TypeId.IntLiteral => return fmt.parseInt(Result, str, 10), |
| 270 | TypeId.Float, TypeId.FloatLiteral => return fmt.parseFloat(Result, str), | 270 | TypeId.Float, TypeId.FloatLiteral => @compileError("TODO: Implement str to float"), |
| 271 | TypeId.Nullable => { | 271 | TypeId.Nullable => { |
| 272 | if (mem.eql(u8, "null", str)) | 272 | if (mem.eql(u8, "null", str)) |
| 273 | return null; | 273 | return null; |