Feat: parse custom rsx syntax

This commit is contained in:
Jonathan Kelley committed 2021-03-01 22:55:20 -05:00
1 parent 114a446c0a
commit da00df6688
4 files changed
+271 -172

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
use dioxus_core_macro::rsx;
pub fn main() {
// render(rsx! {
// _ {}
// });
let g = String::from("asd");
let lazy = rsx! {
div {
a: "asd",
a: "asd",
a: "asd",
a: "asd",
a: "asd",
a: {rsx!{ h1 {"hello world"} }}, // include
a: {g},
b: {1 + 2},
onclick: {move |_| {
println!("hello world!")
}},
div {
a: "asd"
div {
div {
div {
}
}
}
}
h1 {
}
h2 {
"child"
}
"Childnode"
}
};
render(lazy);
}
fn render(f: impl Fn(())) {}