authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-12-24 20:20:15 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-12-24 20:20:15 -08:00
loga24bb6d70c6dfa105e2375da4b23421d1057295e
treef429257ce523a51ba73567ca73f918b3c69c6a04
parent10b157fd88ac9baecd0ab2f0c5bdd36081684edc

scripts: no need for exec to return bool


22 files changed, 24 insertions(+), 63 deletions(-)

scripts/ArabicShaping.zig+1-2
...@@ -139,7 +139,7 @@ pub usingnamespace common.Main(struct {...@@ -139,7 +139,7 @@ pub usingnamespace common.Main(struct {
139 \\139 \\
140 ;140 ;
141141
142 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {142 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
143 var it = std.mem.split(u8, line, ";");143 var it = std.mem.split(u8, line, ";");
144 const c = std.mem.trim(u8, it.next().?, " ");144 const c = std.mem.trim(u8, it.next().?, " ");
145 const n = std.mem.trim(u8, it.next().?, " ");145 const n = std.mem.trim(u8, it.next().?, " ");
...@@ -148,6 +148,5 @@ pub usingnamespace common.Main(struct {...@@ -148,6 +148,5 @@ pub usingnamespace common.Main(struct {
148 const g2 = try std.mem.replaceOwned(u8, alloc, g, " ", "_");148 const g2 = try std.mem.replaceOwned(u8, alloc, g, " ", "_");
149149
150 try writer.print(" .{{ .codepoint = 0x{s}, .schematic_name = \"{s}\", .joining_type = .{s}, .joining_group = .{s} }},\n", .{ c, n, t, g2 });150 try writer.print(" .{{ .codepoint = 0x{s}, .schematic_name = \"{s}\", .joining_type = .{s}, .joining_group = .{s} }},\n", .{ c, n, t, g2 });
151 return true;
152 }151 }
153});152});
scripts/BidiBrackets.zig+1-2
...@@ -28,7 +28,7 @@ pub usingnamespace common.Main(struct {...@@ -28,7 +28,7 @@ pub usingnamespace common.Main(struct {
28 \\28 \\
29 ;29 ;
3030
31 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {31 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
32 _ = alloc;32 _ = alloc;
3333
34 var it = std.mem.split(u8, line, ";");34 var it = std.mem.split(u8, line, ";");
...@@ -37,6 +37,5 @@ pub usingnamespace common.Main(struct {...@@ -37,6 +37,5 @@ pub usingnamespace common.Main(struct {
37 const c = std.mem.trim(u8, it.next().?, " ");37 const c = std.mem.trim(u8, it.next().?, " ");
3838
39 try writer.print(" .{{ .codepoint = 0x{s}, .pair = 0x{s}, .type = .{s} }}, // {s}\n", .{ a, b, c[0..1], c[4..] });39 try writer.print(" .{{ .codepoint = 0x{s}, .pair = 0x{s}, .type = .{s} }}, // {s}\n", .{ a, b, c[0..1], c[4..] });
40 return true;
41 }40 }
42});41});
scripts/BidiMirroring.zig+1-2
...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {
21 \\21 \\
22 ;22 ;
2323
24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
25 _ = alloc;25 _ = alloc;
26 var it = std.mem.tokenize(u8, line, "; #");26 var it = std.mem.tokenize(u8, line, "; #");
27 const c = it.next().?;27 const c = it.next().?;
...@@ -29,6 +29,5 @@ pub usingnamespace common.Main(struct {...@@ -29,6 +29,5 @@ pub usingnamespace common.Main(struct {
29 const t = it.rest();29 const t = it.rest();
3030
31 try writer.print(" .{{ .codepoint = 0x{s}, .mirror = 0x{s} }}, // {s}\n", .{ c, m, t });31 try writer.print(" .{{ .codepoint = 0x{s}, .mirror = 0x{s} }}, // {s}\n", .{ c, m, t });
32 return true;
33 }32 }
34});33});
scripts/Blocks.zig+1-2
...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {
22 \\22 \\
23 ;23 ;
2424
25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
26 _ = alloc;26 _ = alloc;
2727
28 var it1 = std.mem.split(u8, line, "; ");28 var it1 = std.mem.split(u8, line, "; ");
...@@ -32,6 +32,5 @@ pub usingnamespace common.Main(struct {...@@ -32,6 +32,5 @@ pub usingnamespace common.Main(struct {
32 const name = it1.next().?;32 const name = it1.next().?;
3333
34 try writer.print(" .{{ .from = 0x{s}, .to = 0x{s}, .name = \"{s}\" }},\n", .{ from, to, name });34 try writer.print(" .{{ .from = 0x{s}, .to = 0x{s}, .name = \"{s}\" }},\n", .{ from, to, name });
35 return true;
36 }35 }
37});36});
scripts/CJKRadicals.zig+1-2
...@@ -23,7 +23,7 @@ pub usingnamespace common.Main(struct {...@@ -23,7 +23,7 @@ pub usingnamespace common.Main(struct {
23 \\23 \\
24 ;24 ;
2525
26 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {26 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
27 _ = alloc;27 _ = alloc;
28 var it = std.mem.tokenize(u8, line, "; ");28 var it = std.mem.tokenize(u8, line, "; ");
29 var n = it.next().?;29 var n = it.next().?;
...@@ -33,6 +33,5 @@ pub usingnamespace common.Main(struct {...@@ -33,6 +33,5 @@ pub usingnamespace common.Main(struct {
33 n = std.mem.trimRight(u8, n, "'");33 n = std.mem.trimRight(u8, n, "'");
3434
35 try writer.print(" .{{ .number = {s}, .simplified = {}, .character = 0x{s}, .ideograph = 0x{s} }},\n", .{ n, s, c, i });35 try writer.print(" .{{ .number = {s}, .simplified = {}, .character = 0x{s}, .ideograph = 0x{s} }},\n", .{ n, s, c, i });
36 return true;
37 }36 }
38});37});
scripts/CaseFolding.zig+1-2
...@@ -36,7 +36,7 @@ pub usingnamespace common.Main(struct {...@@ -36,7 +36,7 @@ pub usingnamespace common.Main(struct {
36 \\36 \\
37 ;37 ;
3838
39 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {39 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
40 _ = alloc;40 _ = alloc;
41 var it = std.mem.split(u8, line, "; ");41 var it = std.mem.split(u8, line, "; ");
42 const code = it.next().?;42 const code = it.next().?;
...@@ -61,6 +61,5 @@ pub usingnamespace common.Main(struct {...@@ -61,6 +61,5 @@ pub usingnamespace common.Main(struct {
61 try writer.writeAll(" } }, // ");61 try writer.writeAll(" } }, // ");
62 try writer.writeAll(it.rest());62 try writer.writeAll(it.rest());
63 try writer.writeAll("\n");63 try writer.writeAll("\n");
64 return true;
65 }64 }
66});65});
scripts/CompositionExclusions.zig+1-2
...@@ -17,7 +17,7 @@ pub usingnamespace common.Main(struct {...@@ -17,7 +17,7 @@ pub usingnamespace common.Main(struct {
17 \\17 \\
18 ;18 ;
1919
20 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {20 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
21 _ = alloc;21 _ = alloc;
22 var it = std.mem.split(u8, line, " ");22 var it = std.mem.split(u8, line, " ");
23 try writer.print(" 0x{s}, // ", .{it.next().?});23 try writer.print(" 0x{s}, // ", .{it.next().?});
...@@ -30,6 +30,5 @@ pub usingnamespace common.Main(struct {...@@ -30,6 +30,5 @@ pub usingnamespace common.Main(struct {
30 break;30 break;
31 }31 }
32 }32 }
33 return true;
34 }33 }
35});34});
scripts/DerivedAge.zig+1-3
...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {
22 \\22 \\
23 ;23 ;
2424
25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
26 _ = alloc;26 _ = alloc;
27 var it = std.mem.tokenize(u8, line, "; ");27 var it = std.mem.tokenize(u8, line, "; ");
2828
...@@ -41,7 +41,5 @@ pub usingnamespace common.Main(struct {...@@ -41,7 +41,5 @@ pub usingnamespace common.Main(struct {
41 const minor = jt.next().?;41 const minor = jt.next().?;
42 try writer.print(" .since = .{{ {s},{s} }} }},\n", .{ major, minor });42 try writer.print(" .since = .{{ {s},{s} }} }},\n", .{ major, minor });
43 }43 }
44
45 return true;
46 }44 }
47});45});
scripts/DerivedCoreProperties.zig+1-3
...@@ -42,7 +42,7 @@ pub usingnamespace common.Main(struct {...@@ -42,7 +42,7 @@ pub usingnamespace common.Main(struct {
42 \\42 \\
43 ;43 ;
4444
45 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {45 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
46 _ = alloc;46 _ = alloc;
47 var it = std.mem.tokenize(u8, line, "; ");47 var it = std.mem.tokenize(u8, line, "; ");
4848
...@@ -58,7 +58,5 @@ pub usingnamespace common.Main(struct {...@@ -58,7 +58,5 @@ pub usingnamespace common.Main(struct {
58 const prop = it.next().?;58 const prop = it.next().?;
59 try writer.print(" .prop = .{s} }},\n", .{prop});59 try writer.print(" .prop = .{s} }},\n", .{prop});
60 }60 }
61
62 return true;
63 }61 }
64});62});
scripts/EastAsianWidth.zig+1-3
...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {
22 \\22 \\
23 ;23 ;
2424
25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
26 _ = alloc;26 _ = alloc;
27 var it = std.mem.tokenize(u8, line, "; ");27 var it = std.mem.tokenize(u8, line, "; ");
2828
...@@ -38,7 +38,5 @@ pub usingnamespace common.Main(struct {...@@ -38,7 +38,5 @@ pub usingnamespace common.Main(struct {
38 const prop = it.next().?;38 const prop = it.next().?;
39 try writer.print(" .prop = .{s} }},\n", .{prop});39 try writer.print(" .prop = .{s} }},\n", .{prop});
40 }40 }
41
42 return true;
43 }41 }
44});42});
scripts/EmojiSources.zig+2-4
...@@ -23,9 +23,9 @@ pub usingnamespace common.Main(struct {...@@ -23,9 +23,9 @@ pub usingnamespace common.Main(struct {
23 \\23 \\
24 ;24 ;
2525
26 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {26 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
27 _ = alloc;27 _ = alloc;
28 if (std.mem.count(u8, line, " ") > 0) return true;28 if (std.mem.count(u8, line, " ") > 0) return;
29 var it = std.mem.split(u8, line, ";");29 var it = std.mem.split(u8, line, ";");
30 const code = it.next().?;30 const code = it.next().?;
31 // FIXME remove @as and temp vars after switch off stage131 // FIXME remove @as and temp vars after switch off stage1
...@@ -39,7 +39,5 @@ pub usingnamespace common.Main(struct {...@@ -39,7 +39,5 @@ pub usingnamespace common.Main(struct {
39 kddi,39 kddi,
40 softbank,40 softbank,
41 });41 });
42
43 return true;
44 }42 }
45});43});
scripts/EquivalentUnifiedIdeograph.zig+1-3
...@@ -16,7 +16,7 @@ pub usingnamespace common.Main(struct {...@@ -16,7 +16,7 @@ pub usingnamespace common.Main(struct {
16 \\16 \\
17 ;17 ;
1818
19 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {19 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
20 _ = alloc;20 _ = alloc;
21 var it = std.mem.tokenize(u8, line, "; ");21 var it = std.mem.tokenize(u8, line, "; ");
2222
...@@ -33,7 +33,5 @@ pub usingnamespace common.Main(struct {...@@ -33,7 +33,5 @@ pub usingnamespace common.Main(struct {
33 } else {33 } else {
34 try writer.print(" .{{ 0x{s}, 0x{s} }},\n", .{ first, next });34 try writer.print(" .{{ 0x{s}, 0x{s} }},\n", .{ first, next });
35 }35 }
36
37 return true;
38 }36 }
39});37});
scripts/HangulSyllableType.zig+1-3
...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {...@@ -22,7 +22,7 @@ pub usingnamespace common.Main(struct {
22 \\22 \\
23 ;23 ;
2424
25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {25 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
26 _ = alloc;26 _ = alloc;
27 var it = std.mem.tokenize(u8, line, "; ");27 var it = std.mem.tokenize(u8, line, "; ");
2828
...@@ -38,7 +38,5 @@ pub usingnamespace common.Main(struct {...@@ -38,7 +38,5 @@ pub usingnamespace common.Main(struct {
38 const prop = it.next().?;38 const prop = it.next().?;
39 try writer.print(" .prop = .{s} }},\n", .{prop});39 try writer.print(" .prop = .{s} }},\n", .{prop});
40 }40 }
41
42 return true;
43 }41 }
44});42});
scripts/IndicPositionalCategory.zig+1-3
...@@ -37,7 +37,7 @@ pub usingnamespace common.Main(struct {...@@ -37,7 +37,7 @@ pub usingnamespace common.Main(struct {
37 \\37 \\
38 ;38 ;
3939
40 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {40 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
41 _ = alloc;41 _ = alloc;
42 var it = std.mem.tokenize(u8, line, "; ");42 var it = std.mem.tokenize(u8, line, "; ");
4343
...@@ -54,7 +54,5 @@ pub usingnamespace common.Main(struct {...@@ -54,7 +54,5 @@ pub usingnamespace common.Main(struct {
54 } else {54 } else {
55 try writer.print(" .{{ .code = 0x{s}, .category = .{s} }},\n", .{ first, next });55 try writer.print(" .{{ .code = 0x{s}, .category = .{s} }},\n", .{ first, next });
56 }56 }
57
58 return true;
59 }57 }
60});58});
scripts/IndicSyllabicCategory.zig+1-3
...@@ -57,7 +57,7 @@ pub usingnamespace common.Main(struct {...@@ -57,7 +57,7 @@ pub usingnamespace common.Main(struct {
57 \\57 \\
58 ;58 ;
5959
60 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {60 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
61 _ = alloc;61 _ = alloc;
62 var it = std.mem.tokenize(u8, line, "; ");62 var it = std.mem.tokenize(u8, line, "; ");
6363
...@@ -74,7 +74,5 @@ pub usingnamespace common.Main(struct {...@@ -74,7 +74,5 @@ pub usingnamespace common.Main(struct {
74 } else {74 } else {
75 try writer.print(" .{{ .code = 0x{s}, .category = .{s} }},\n", .{ first, next });75 try writer.print(" .{{ .code = 0x{s}, .category = .{s} }},\n", .{ first, next });
76 }76 }
77
78 return true;
79 }77 }
80});78});
scripts/Jamo.zig+1-3
...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {
21 \\21 \\
22 ;22 ;
2323
24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
25 _ = alloc;25 _ = alloc;
26 var it = std.mem.tokenize(u8, line, "; ");26 var it = std.mem.tokenize(u8, line, "; ");
2727
...@@ -30,7 +30,5 @@ pub usingnamespace common.Main(struct {...@@ -30,7 +30,5 @@ pub usingnamespace common.Main(struct {
30 const actual = if (std.mem.eql(u8, next, "#")) "" else next;30 const actual = if (std.mem.eql(u8, next, "#")) "" else next;
3131
32 try writer.print(" .{{ .code = 0x{s}, .short_name = \"{}\" }},\n", .{ first, std.zig.fmtEscapes(actual) });32 try writer.print(" .{{ .code = 0x{s}, .short_name = \"{}\" }},\n", .{ first, std.zig.fmtEscapes(actual) });
33
34 return true;
35 }33 }
36});34});
scripts/NameAliases.zig+1-3
...@@ -28,7 +28,7 @@ pub usingnamespace common.Main(struct {...@@ -28,7 +28,7 @@ pub usingnamespace common.Main(struct {
28 \\28 \\
29 ;29 ;
3030
31 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {31 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
32 _ = alloc;32 _ = alloc;
33 var it = std.mem.split(u8, line, ";");33 var it = std.mem.split(u8, line, ";");
3434
...@@ -37,7 +37,5 @@ pub usingnamespace common.Main(struct {...@@ -37,7 +37,5 @@ pub usingnamespace common.Main(struct {
37 std.zig.fmtEscapes(it.next().?),37 std.zig.fmtEscapes(it.next().?),
38 it.next().?,38 it.next().?,
39 });39 });
40
41 return true;
42 }40 }
43});41});
scripts/NamedSequences.zig+1-3
...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {
21 \\21 \\
22 ;22 ;
2323
24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
25 _ = alloc;25 _ = alloc;
26 var it = std.mem.split(u8, line, ";");26 var it = std.mem.split(u8, line, ";");
2727
...@@ -32,7 +32,5 @@ pub usingnamespace common.Main(struct {...@@ -32,7 +32,5 @@ pub usingnamespace common.Main(struct {
32 try writer.print(" 0x{s},", .{jtem});32 try writer.print(" 0x{s},", .{jtem});
33 }33 }
34 try writer.writeAll(" } },\n");34 try writer.writeAll(" } },\n");
35
36 return true;
37 }35 }
38});36});
scripts/NamedSequencesProv.zig+1-3
...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {
21 \\21 \\
22 ;22 ;
2323
24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
25 _ = alloc;25 _ = alloc;
26 var it = std.mem.split(u8, line, ";");26 var it = std.mem.split(u8, line, ";");
2727
...@@ -32,7 +32,5 @@ pub usingnamespace common.Main(struct {...@@ -32,7 +32,5 @@ pub usingnamespace common.Main(struct {
32 try writer.print(" 0x{s},", .{jtem});32 try writer.print(" 0x{s},", .{jtem});
33 }33 }
34 try writer.writeAll(" } },\n");34 try writer.writeAll(" } },\n");
35
36 return true;
37 }35 }
38});36});
scripts/PropertyAliases.zig+1-3
...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {...@@ -21,7 +21,7 @@ pub usingnamespace common.Main(struct {
21 \\};21 \\};
22 ;22 ;
2323
24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {24 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
25 _ = alloc;25 _ = alloc;
26 var it = std.mem.tokenize(u8, line, "; ");26 var it = std.mem.tokenize(u8, line, "; ");
2727
...@@ -29,7 +29,5 @@ pub usingnamespace common.Main(struct {...@@ -29,7 +29,5 @@ pub usingnamespace common.Main(struct {
29 std.zig.fmtEscapes(it.next().?),29 std.zig.fmtEscapes(it.next().?),
30 std.zig.fmtEscapes(it.next().?),30 std.zig.fmtEscapes(it.next().?),
31 });31 });
32
33 return true;
34 }32 }
35});33});
scripts/ScriptExtensions.zig+1-3
...@@ -87,7 +87,7 @@ pub usingnamespace common.Main(struct {...@@ -87,7 +87,7 @@ pub usingnamespace common.Main(struct {
87 \\87 \\
88 ;88 ;
8989
90 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {90 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
91 _ = alloc;91 _ = alloc;
92 var it = std.mem.tokenize(u8, line, "; ");92 var it = std.mem.tokenize(u8, line, "; ");
9393
...@@ -103,8 +103,6 @@ pub usingnamespace common.Main(struct {...@@ -103,8 +103,6 @@ pub usingnamespace common.Main(struct {
103 } else {103 } else {
104 try writer.print(" .{{ .code = 0x{s}, .scripts = {} }},\n", .{ first, fmtScripts(untilComment(it.rest())) });104 try writer.print(" .{{ .code = 0x{s}, .scripts = {} }},\n", .{ first, fmtScripts(untilComment(it.rest())) });
105 }105 }
106
107 return true;
108 }106 }
109});107});
110108
scripts/_common.zig+2-6
...@@ -64,9 +64,7 @@ pub fn Main(comptime T: type) type {...@@ -64,9 +64,7 @@ pub fn Main(comptime T: type) type {
64 continue;64 continue;
65 }65 }
6666
67 if (!(try T.exec(arena.allocator(), line, w))) {67 try T.exec(arena.allocator(), line, w);
68 break;
69 }
7068
71 std.debug.print("{s}", .{ansi.csi.CursorUp(1)});69 std.debug.print("{s}", .{ansi.csi.CursorUp(1)});
72 std.debug.print("{s}", .{ansi.csi.EraseInLine(0)});70 std.debug.print("{s}", .{ansi.csi.EraseInLine(0)});
...@@ -85,7 +83,7 @@ pub fn nullify(input: []const u8) ?[]const u8 {...@@ -85,7 +83,7 @@ pub fn nullify(input: []const u8) ?[]const u8 {
8583
86pub fn RangeEnum(comptime prop: []const u8) type {84pub fn RangeEnum(comptime prop: []const u8) type {
87 return struct {85 return struct {
88 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool {86 pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !void {
89 _ = alloc;87 _ = alloc;
90 var it = std.mem.tokenize(u8, line, "; ");88 var it = std.mem.tokenize(u8, line, "; ");
9189
...@@ -99,8 +97,6 @@ pub fn RangeEnum(comptime prop: []const u8) type {...@@ -99,8 +97,6 @@ pub fn RangeEnum(comptime prop: []const u8) type {
99 } else {97 } else {
100 try writer.print(" .{{ .from = 0x{s}, .to = 0x{s}, .{s} = .{s} }},\n", .{ first, first, prop, next });98 try writer.print(" .{{ .from = 0x{s}, .to = 0x{s}, .{s} = .{s} }},\n", .{ first, first, prop, next });
101 }99 }
102
103 return true;
104 }100 }
105 };101 };
106}102}