Implement comment block.

This commit is contained in:
Tom Alexander 2023-12-30 17:44:32 -05:00
parent 172d72aa46
commit 60a4835590
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::CommentBlock;
use crate::types::GetAffiliatedKeywords;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmCommentBlock {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
pub(crate) value: String,
}
to_wasm!(
@ -21,12 +23,17 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::CommentBlock(original) },
{ "TODO".into() },
{ "comment-block".into() },
{
let additional_properties = original
.get_affiliated_keywords()
.to_wasm(wasm_context.clone())?;
Ok((
Vec::new(),
WasmCommentBlock {
additional_properties: AdditionalProperties::default(),
additional_properties,
value: original.contents.to_owned(),
},
))
}