| ... | ... | @@ -131,7 +131,7 @@ pub fn addOption(self: *OptionsStep, comptime T: type, name: []const u8, value: |
| 131 | 131 | }, |
| 132 | 132 | else => {}, |
| 133 | 133 | } |
| 134 | | out.print("pub const {}: {s} = ", .{ std.zig.fmtId(name), std.zig.fmtId(@typeName(T)) }) catch unreachable; |
| 134 | out.print("pub const {}: {s} = ", .{ std.zig.fmtId(name), @typeName(T) }) catch unreachable; |
| 135 | 135 | printLiteral(out, value, 0) catch unreachable; |
| 136 | 136 | out.writeAll(";\n") catch unreachable; |
| 137 | 137 | } |
| ... | ... | @@ -292,9 +292,10 @@ test "OptionsStep" { |
| 292 | 292 | |
| 293 | 293 | const options = builder.addOptions(); |
| 294 | 294 | |
| 295 | | const KeywordEnum = enum { |
| 296 | | @"0.8.1", |
| 297 | | }; |
| 295 | // TODO this regressed at some point |
| 296 | //const KeywordEnum = enum { |
| 297 | // @"0.8.1", |
| 298 | //}; |
| 298 | 299 | |
| 299 | 300 | const nested_array = [2][2]u16{ |
| 300 | 301 | [2]u16{ 300, 200 }, |
| ... | ... | @@ -310,7 +311,7 @@ test "OptionsStep" { |
| 310 | 311 | options.addOption(?[]const u8, "optional_string", null); |
| 311 | 312 | options.addOption([2][2]u16, "nested_array", nested_array); |
| 312 | 313 | options.addOption([]const []const u16, "nested_slice", nested_slice); |
| 313 | | options.addOption(KeywordEnum, "keyword_enum", .@"0.8.1"); |
| 314 | //options.addOption(KeywordEnum, "keyword_enum", .@"0.8.1"); |
| 314 | 315 | options.addOption(std.builtin.Version, "version", try std.builtin.Version.parse("0.1.2")); |
| 315 | 316 | options.addOption(std.SemanticVersion, "semantic_version", try std.SemanticVersion.parse("0.1.2-foo+bar")); |
| 316 | 317 | |
| ... | ... | @@ -341,10 +342,10 @@ test "OptionsStep" { |
| 341 | 342 | \\ 200, |
| 342 | 343 | \\ }, |
| 343 | 344 | \\}; |
| 344 | | \\pub const KeywordEnum = enum { |
| 345 | | \\ @"0.8.1", |
| 346 | | \\}; |
| 347 | | \\pub const keyword_enum: KeywordEnum = KeywordEnum.@"0.8.1"; |
| 345 | //\\pub const KeywordEnum = enum { |
| 346 | //\\ @"0.8.1", |
| 347 | //\\}; |
| 348 | //\\pub const keyword_enum: KeywordEnum = KeywordEnum.@"0.8.1"; |
| 348 | 349 | \\pub const version: @import("std").builtin.Version = .{ |
| 349 | 350 | \\ .major = 0, |
| 350 | 351 | \\ .minor = 1, |