Populating document's children.

This commit is contained in:
Tom Alexander
2023-12-25 12:55:48 -05:00
parent 995b41e697
commit 67e5829fd9
5 changed files with 40 additions and 8 deletions

View File

@@ -33,16 +33,34 @@ to_wasm!(
})
.collect();
let children = original
.zeroth_section
.iter()
.map(|child| {
child
.to_wasm(wasm_context.clone())
.map(Into::<WasmAstNode<'_>>::into)
})
.chain(original.children.iter().map(|child| {
child
.to_wasm(wasm_context.clone())
.map(Into::<WasmAstNode<'_>>::into)
}))
.collect::<Result<Vec<_>, _>>()?;
// let children = original
// .children
// .iter()
// .map(|child| child.to_wasm(wasm_context.clone()))
// .map(|child| {
// child
// .to_wasm(wasm_context.clone())
// .map(Into::<WasmAstNode<'_>>::into)
// })
// .collect::<Result<Vec<_>, _>>()?;
Ok(WasmDocument {
standard_properties,
additional_properties,
children: Vec::new(),
children,
})
}
);