Implement comment.

This commit is contained in:
Tom Alexander 2023-12-29 21:59:45 -05:00
parent eb2995dd3b
commit cdf87641c5
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 4 additions and 6 deletions

View File

@ -4,15 +4,13 @@ use serde::Serialize;
use super::ast_node::WasmAstNode;
use super::macros::to_wasm;
use super::to_wasm::ToWasm;
use super::AdditionalProperties;
use crate::compare::ElispFact;
use crate::types::Comment;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmComment {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
pub(crate) value: String,
}
to_wasm!(
@ -21,12 +19,12 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::Comment(original) },
{ "TODO".into() },
{ "comment".into() },
{
Ok((
Vec::new(),
WasmComment {
additional_properties: AdditionalProperties::default(),
value: original.get_value(),
},
))
}

View File

@ -34,7 +34,7 @@ to_wasm!(
Vec::new(),
WasmKeyword {
additional_properties,
key: original.key.to_owned(),
key: original.key.to_uppercase(),
value: original.value.to_owned(),
},
))