working structure

This commit is contained in:
2024-10-15 13:20:04 +02:00
parent eaf5828d27
commit 9e013f737f
6 changed files with 60 additions and 96 deletions
+8 -17
View File
@@ -1,19 +1,10 @@
#[macro_export]
macro_rules! __xml {
($(<$tag:ident> {$($inner:tt)*})+) => {{
let mut comps = String::new();
$(
let inner = osui::__xml!($($inner)*);
comps.push_str(&format!("{} {{{}}}", stringify!($tag), inner));
)*
comps
}};
() => { String::new() };
}
use std::fmt::Debug;
#[macro_export]
macro_rules! xml {
(<$tag:ident> {$($inner:tt)*}) => {
osui::__xml!(<$tag> {$($inner)*})
};
pub mod components;
pub mod macros;
pub trait Component: Debug {}
pub struct ComponentParams {
pub children: Vec<Box<dyn Component>>,
}