chore: fix rsx printer
This commit is contained in:
1 parent
182f11d0f3
commit
4e330bc1ec
2 files changed
-43
No files matched your search
@@ -1,38 +0,0 @@
|
|||||||
use std::collections::VecDeque;
|
|
||||||
|
|
||||||
use dioxus_rsx::{BodyNode, CallBody};
|
|
||||||
|
|
||||||
const LINE_WIDTH: usize = 80;
|
|
||||||
|
|
||||||
pub struct Printer {
|
|
||||||
buf: String,
|
|
||||||
// queue: Vec<Item>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub enum Break {
|
|
||||||
// Space flexes to line if need be
|
|
||||||
Space,
|
|
||||||
|
|
||||||
// Line always forces a new line
|
|
||||||
// Comments are an example of this
|
|
||||||
Line,
|
|
||||||
}
|
|
||||||
|
|
||||||
// enum Item {
|
|
||||||
// BreakBegin,
|
|
||||||
// BreakEnd,
|
|
||||||
// Text(Cow<'static, str>),
|
|
||||||
// }
|
|
||||||
|
|
||||||
impl Printer {
|
|
||||||
fn doit(&mut self, body: CallBody) {
|
|
||||||
for node in body.roots {}
|
|
||||||
}
|
|
||||||
fn node(&mut self, node: BodyNode) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let src = r#"div {}"#;
|
|
||||||
let contents: CallBody = syn::parse_str(src).unwrap();
|
|
||||||
}
|
|
||||||
@@ -15,13 +15,8 @@ rsx! {
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
div {
|
div {
|
||||||
//
|
|
||||||
abcd,
|
abcd,
|
||||||
|
|
||||||
//
|
|
||||||
ball,
|
ball,
|
||||||
|
|
||||||
//
|
|
||||||
s,
|
s,
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in new issue
Block a user