tangled
alpha
login
or
join now
altagos.dev
/
pretty
0
fork
atom
A pretty printer for zig
zig
0
fork
atom
overview
issues
pulls
pipelines
clean up
altagos.dev
1 month ago
967a7ac2
f3bc70ac
verified
This commit was signed with the committer's
known signature
.
altagos.dev
SSH Key Fingerprint:
SHA256:UbTjEcCZlc6GzQWLCuDK3D//HESWD2xFPkzue9XMras=
+4
-11
2 changed files
expand all
collapse all
unified
split
build.zig
pretty.zig
+1
build.zig
···
21
21
}),
22
22
.name = "pretty-example",
23
23
});
24
24
+
b.installArtifact(example);
24
25
25
26
const run_example = b.addRunArtifact(example);
26
27
run_example.step.dependOn(b.getInstallStep());
+3
-11
pretty.zig
···
38
38
color_true: Io.Terminal.Color = .bright_green,
39
39
color_false: Io.Terminal.Color = .bright_red,
40
40
41
41
-
pub fn getColor(this: Theme, option: Colors) Io.Terminal.Color {
42
42
-
return switch (option) {
43
43
-
// .dim => this.color_dim,
44
44
-
// .field => this.color_field,
45
45
-
// .value => this.color_value,
46
46
-
// .@"error" => this.color_error,
47
47
-
// .type => this.color_type,
48
48
-
// .null => this.color_null,
49
49
-
// .true => this.color_true,
50
50
-
// .false => this.color_false,
51
51
-
inline else => |opt| @field(this, "color_" ++ @tagName(opt)),
41
41
+
pub fn getColor(this: Theme, color: Colors) Io.Terminal.Color {
42
42
+
return switch (color) {
43
43
+
inline else => |col| @field(this, "color_" ++ @tagName(col)),
52
44
};
53
45
}
54
46
};