mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
wip: wire up bodynodes in more places
This commit is contained in:
parent
928b5358b2
commit
03bc63dacc
2 changed files with 21 additions and 0 deletions
|
@ -69,6 +69,8 @@ impl Buffer {
|
|||
BodyNode::Component(component) => self.write_component(component),
|
||||
BodyNode::Text(text) => self.write_text(text),
|
||||
BodyNode::RawExpr(exp) => self.write_raw_expr(exp),
|
||||
BodyNode::ForLoop(exp) => self.write_for_loop(exp),
|
||||
BodyNode::IfChain(exp) => self.write_if_chain(exp),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
//! pretty printer for rsx!
|
||||
use std::fmt::{Result, Write};
|
||||
|
||||
use dioxus_rsx::ForLoop;
|
||||
|
||||
use crate::Buffer;
|
||||
|
||||
impl Buffer {
|
||||
|
@ -41,6 +43,23 @@ impl Buffer {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn write_if_chain(&mut self, exp: &syn::ExprIf) -> Result {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn write_for_loop(&mut self, for_loop: &ForLoop) -> Result {
|
||||
let ForLoop {
|
||||
for_token,
|
||||
pat,
|
||||
in_token,
|
||||
expr,
|
||||
body,
|
||||
} = for_loop;
|
||||
todo!()
|
||||
// self.write_raw_expr(&for_loop.expr)?;
|
||||
// Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// :(
|
||||
|
|
Loading…
Reference in a new issue