| ... | @@ -171,6 +171,7 @@ fn printLiteral(out: anytype, val: anytype, indent: u8) !void { | ... | @@ -171,6 +171,7 @@ fn printLiteral(out: anytype, val: anytype, indent: u8) !void { |
| 171 | .Void, | 171 | .Void, |
| 172 | .Bool, | 172 | .Bool, |
| 173 | .Int, | 173 | .Int, |
| | 174 | .ComptimeInt, |
| 174 | .Float, | 175 | .Float, |
| 175 | .Null, | 176 | .Null, |
| 176 | => try out.print("{any}", .{val}), | 177 | => try out.print("{any}", .{val}), |
| ... | @@ -302,6 +303,7 @@ test "OptionsStep" { | ... | @@ -302,6 +303,7 @@ test "OptionsStep" { |
| 302 | options.addOption(usize, "option1", 1); | 303 | options.addOption(usize, "option1", 1); |
| 303 | options.addOption(?usize, "option2", null); | 304 | options.addOption(?usize, "option2", null); |
| 304 | options.addOption(?usize, "option3", 3); | 305 | options.addOption(?usize, "option3", 3); |
| | 306 | options.addOption(comptime_int, "option4", 4); |
| 305 | options.addOption([]const u8, "string", "zigisthebest"); | 307 | options.addOption([]const u8, "string", "zigisthebest"); |
| 306 | options.addOption(?[]const u8, "optional_string", null); | 308 | options.addOption(?[]const u8, "optional_string", null); |
| 307 | options.addOption([2][2]u16, "nested_array", nested_array); | 309 | options.addOption([2][2]u16, "nested_array", nested_array); |
| ... | @@ -314,6 +316,7 @@ test "OptionsStep" { | ... | @@ -314,6 +316,7 @@ test "OptionsStep" { |
| 314 | \\pub const option1: usize = 1; | 316 | \\pub const option1: usize = 1; |
| 315 | \\pub const option2: ?usize = null; | 317 | \\pub const option2: ?usize = null; |
| 316 | \\pub const option3: ?usize = 3; | 318 | \\pub const option3: ?usize = 3; |
| | 319 | \\pub const option4: comptime_int = 4; |
| 317 | \\pub const string: []const u8 = "zigisthebest"; | 320 | \\pub const string: []const u8 = "zigisthebest"; |
| 318 | \\pub const optional_string: ?[]const u8 = null; | 321 | \\pub const optional_string: ?[]const u8 = null; |
| 319 | \\pub const nested_array: [2][2]u16 = [2][2]u16 { | 322 | \\pub const nested_array: [2][2]u16 = [2][2]u16 { |