mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Also debug print syntax tree
This commit is contained in:
parent
aeb036f4dc
commit
d7072f378f
@ -261,6 +261,9 @@ fn test_part(
|
|||||||
) -> (bool, bool, Vec<Rc<Frame>>) {
|
) -> (bool, bool, Vec<Rc<Frame>>) {
|
||||||
let id = ctx.sources.provide(src_path, src);
|
let id = ctx.sources.provide(src_path, src);
|
||||||
let source = ctx.sources.get(id);
|
let source = ctx.sources.get(id);
|
||||||
|
if debug {
|
||||||
|
println!("Syntax: {:#?}", source.root())
|
||||||
|
}
|
||||||
|
|
||||||
let (local_compare_ref, mut ref_errors) = parse_metadata(&source);
|
let (local_compare_ref, mut ref_errors) = parse_metadata(&source);
|
||||||
let compare_ref = local_compare_ref.unwrap_or(compare_ref);
|
let compare_ref = local_compare_ref.unwrap_or(compare_ref);
|
||||||
@ -270,7 +273,7 @@ fn test_part(
|
|||||||
Ok(module) => {
|
Ok(module) => {
|
||||||
let tree = module.into_root();
|
let tree = module.into_root();
|
||||||
if debug {
|
if debug {
|
||||||
println!("{tree:#?}");
|
println!("Layout: {tree:#?}");
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut frames = tree.layout(ctx);
|
let mut frames = tree.layout(ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user