organic/src/wasm/comment.rs
Tom Alexander 0aa3939a75
Format.
2024-01-01 18:34:10 -05:00

32 lines
647 B
Rust

use serde::Deserialize;
use serde::Serialize;
use super::ast_node::WasmAstNode;
use super::macros::to_wasm;
use super::to_wasm::ToWasm;
use crate::types::Comment;
use crate::util::elisp_fact::ElispFact;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmComment {
pub(crate) value: String,
}
to_wasm!(
WasmComment,
Comment<'s>,
original,
wasm_context,
{ WasmAstNode::Comment(original) },
{ "comment".into() },
{
Ok((
Vec::new(),
WasmComment {
value: original.get_value(),
},
))
}
);