Implement diary sexp.

This commit is contained in:
Tom Alexander 2023-12-30 18:03:57 -05:00
parent c8e3fdba51
commit 4f1a151e97
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -7,12 +7,14 @@ use super::to_wasm::ToWasm;
use super::AdditionalProperties;
use crate::compare::ElispFact;
use crate::types::DiarySexp;
use crate::types::GetAffiliatedKeywords;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmDiarySexp {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
pub(crate) value: String,
}
to_wasm!(
@ -21,12 +23,17 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::DiarySexp(original) },
{ "TODO".into() },
{ "diary-sexp".into() },
{
let additional_properties = original
.get_affiliated_keywords()
.to_wasm(wasm_context.clone())?;
Ok((
Vec::new(),
WasmDiarySexp {
additional_properties: AdditionalProperties::default(),
additional_properties,
value: original.value.to_owned(),
},
))
}