2022-01-18 06:15:51 -06:00
|
|
|
|
2022-02-18 10:04:10 -06:00
|
|
|
/*
|
2022-01-18 06:15:51 -06:00
|
|
|
// TODO improve tokenizer/parser
|
2021-12-24 13:00:20 -06:00
|
|
|
pub fn colorify(eval: &str) {
|
|
|
|
let y = eval.split("$");
|
|
|
|
for z in y {
|
|
|
|
match z {
|
|
|
|
"BLACK" => {
|
|
|
|
set_vga_color(Color::Black, Color::Black);
|
|
|
|
}
|
|
|
|
"RED" => {
|
|
|
|
set_vga_color(Color::Red, Color::Black);
|
|
|
|
}
|
|
|
|
"GREEN" => {
|
|
|
|
set_vga_color(Color::Green, Color::Black);
|
|
|
|
}
|
|
|
|
"BLUE" => {
|
|
|
|
set_vga_color(Color::Blue, Color::Black);
|
|
|
|
}
|
|
|
|
"CYAN" => {
|
|
|
|
set_vga_color(Color::Cyan, Color::Black);
|
|
|
|
}
|
|
|
|
"MAGENTA" => {
|
|
|
|
set_vga_color(Color::Magenta, Color::Black);
|
|
|
|
}
|
|
|
|
"BROWN" => {
|
|
|
|
set_vga_color(Color::Brown, Color::Black);
|
|
|
|
}
|
|
|
|
"LIGHTGRAY" => {
|
|
|
|
set_vga_color(Color::LightGray, Color::Black);
|
|
|
|
}
|
|
|
|
"DARKGRAY" => {
|
|
|
|
set_vga_color(Color::DarkGray, Color::Black);
|
|
|
|
}
|
|
|
|
"LIGHTBLUE" => {
|
|
|
|
set_vga_color(Color::LightBlue, Color::Black);
|
|
|
|
}
|
|
|
|
"LIGHTGREEN" => {
|
|
|
|
set_vga_color(Color::LightGreen, Color::Black);
|
|
|
|
}
|
|
|
|
"LIGHTCYAN" => {
|
|
|
|
set_vga_color(Color::LightCyan, Color::Black);
|
|
|
|
}
|
|
|
|
"LIGHTRED" => {
|
|
|
|
set_vga_color(Color::LightRed, Color::Black);
|
|
|
|
}
|
|
|
|
"PINK" => {
|
|
|
|
set_vga_color(Color::Pink, Color::Black);
|
|
|
|
}
|
|
|
|
"YELLOW" => {
|
|
|
|
set_vga_color(Color::Yellow, Color::Black);
|
|
|
|
}
|
|
|
|
"WHITE" => {
|
|
|
|
set_vga_color(Color::White, Color::Black);
|
|
|
|
}
|
|
|
|
"RESET" => {
|
|
|
|
set_vga_color(Color::White, Color::Black);
|
|
|
|
}
|
|
|
|
elk => {
|
2021-12-28 02:56:29 -06:00
|
|
|
kprint!("{}", elk);
|
2021-12-24 13:00:20 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-02-18 10:04:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
pub fn colorify(eval: &str) {}
|