From e102ae25b42b26de9fe5f30734e4fe6821b963e8 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 18 Apr 2024 21:05:59 -0500 Subject: [PATCH] typeck.rs: Make the REPL output a little less unreadable --- cl-repl/examples/typeck.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cl-repl/examples/typeck.rs b/cl-repl/examples/typeck.rs index 099a5d1..ebcb9d0 100644 --- a/cl-repl/examples/typeck.rs +++ b/cl-repl/examples/typeck.rs @@ -6,10 +6,13 @@ use cl_typeck::{ }; use std::error::Error; -const STDLIB_PATH: &str = "stdlib/lib.cl"; +// Path to display in standard library errors +const STDLIB_DISPLAY_PATH: &str = "stdlib/lib.cl"; +// Statically included standard library const STDLIB: &str = include_str!("../../stdlib/lib.cl"); -const C_MAIN: &str = "\x1b[30m"; +// Colors +const C_MAIN: &str = ""; const C_RESV: &str = "\x1b[35m"; const C_CODE: &str = "\x1b[36m"; const C_LISTING: &str = "\x1b[38;5;117m"; @@ -26,7 +29,7 @@ fn main() -> Result<(), Box> { let code = match parser.file() { Ok(code) => code, Err(e) => { - eprintln!("{STDLIB_PATH}:{e}"); + eprintln!("{STDLIB_DISPLAY_PATH}:{e}"); Err(e)? } };