summaryrefslogtreecommitdiff
path: root/core/Messages.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Messages.zig')
-rw-r--r--core/Messages.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Messages.zig b/core/Messages.zig
index e05961b5..eca5ec9f 100644
--- a/core/Messages.zig
+++ b/core/Messages.zig
@@ -435,6 +435,18 @@ pub fn ink(chrome: *const pardes.colors.ChromeTheme, kind: Kind) [3]u8 {
};
}
+/// A message's ink on a ground of the chrome (R9): an error's, a warning's
+/// and a question's their severity's held there (a question info's), an
+/// echo, a notice and progress the ground's dim ink.
+pub fn inkOn(inks: *const pardes.colors.Chrome.Inks, kind: Kind) [3]u8 {
+ return switch (kind) {
+ .@"error" => inks.severity[0],
+ .warn => inks.severity[1],
+ .question => inks.severity[2],
+ .echo, .notice, .progress => inks.dim,
+ };
+}
+
/// The places a compiler's report names put on `s`: each
/// `path:line:col: error|warning|note: words` row (a relative path is
/// `dir`'s), its words there, each place once, and the rows after the