From 809d8786f129589ca51714d4a734d6bd6b818f35 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 2 Nov 2023 14:54:53 -0400 Subject: [PATCH] WIP --- crates/theme2/src/import.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs index 147babf00791d227851b5144b635c2423029b0aa..26850b5b78f046e3ee89ebd791488d88fd19bdbf 100644 --- a/crates/theme2/src/import.rs +++ b/crates/theme2/src/import.rs @@ -9,6 +9,38 @@ struct ImportedThemeFamily { pub themes: Vec, } +struct ImportedThemeVariant { + pub id: String, + pub name: String, + pub colors: ThemeColorsRefinement, +} + +macro_rules! gen_vscode_colors_and_enum { + ($($name:ident: $type:ty),*) => { + #[derive(Debug)] + pub struct VSCodeColors { + $( + pub $name: $type, + )* + } + + pub enum VSCodeColor { + $( + $({ + let mut s = stringify!($name).to_string(); + s.get_mut(0..1).unwrap().make_ascii_uppercase(); + s.replace("_", "") + }), + )* + } + }; +} + +gen_vscode_colors_and_enum! { + terminal_background: String, + terminal_foreground: String +} + #[derive(Debug)] pub struct VSCodeColors { terminal_background: String,