From f50415cb32500502e51d1bd9a4db34dc88bc5da6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 30 Dec 2023 18:05:46 -0500 Subject: [PATCH] Implement drawer. --- src/wasm/drawer.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/wasm/drawer.rs b/src/wasm/drawer.rs index b76292d..98c5f8b 100644 --- a/src/wasm/drawer.rs +++ b/src/wasm/drawer.rs @@ -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(), }, )) }