mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
Debug: use pretty-print to dump the LLR
the Debug trait for the LLR isn't that usefull
This commit is contained in:
parent
f100ee48ff
commit
0345c9bc48
2 changed files with 7 additions and 7 deletions
|
|
@ -90,11 +90,10 @@ pub fn generate(
|
|||
)); // Perhaps byte code in the future?
|
||||
}
|
||||
OutputFormat::Llr => {
|
||||
writeln!(
|
||||
destination,
|
||||
"{:#?}",
|
||||
crate::llr::lower_to_item_tree::lower_to_item_tree(&doc.root_component)
|
||||
)?;
|
||||
let root = crate::llr::lower_to_item_tree::lower_to_item_tree(&doc.root_component);
|
||||
let mut output = String::new();
|
||||
crate::llr::pretty_print::pretty_print(&root, &mut output).unwrap();
|
||||
write!(destination, "{output}")?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -64,9 +64,10 @@ impl<'a> PrettyPrinter<'a> {
|
|||
self.indent()?;
|
||||
writeln!(
|
||||
self.writer,
|
||||
"{}: {};",
|
||||
"{}: {};{}",
|
||||
DisplayPropertyRef(p, &ctx),
|
||||
DisplayExpression(&init.expression.borrow(), &ctx)
|
||||
DisplayExpression(&init.expression.borrow(), &ctx),
|
||||
if init.is_constant { " /*const*/" } else { "" }
|
||||
)?
|
||||
}
|
||||
for ssc in &sc.sub_components {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue