Implement drawer.
This commit is contained in:
parent
4f1a151e97
commit
f50415cb32
@ -7,12 +7,15 @@ use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::Drawer;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmDrawer {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
#[serde(rename = "drawer-name")]
|
||||
pub(crate) drawer_name: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,8 +24,12 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::Drawer(original) },
|
||||
{ "TODO".into() },
|
||||
{ "drawer".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
let children = original
|
||||
.children
|
||||
.iter()
|
||||
@ -36,7 +43,8 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmDrawer {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
additional_properties,
|
||||
drawer_name: original.drawer_name.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user