organic/src/wasm/comment.rs

32 lines
647 B
Rust
Raw Normal View History

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;
2024-01-01 18:34:10 -05:00
use crate::util::elisp_fact::ElispFact;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
2023-12-29 12:49:43 -05:00
pub struct WasmComment {
2023-12-29 21:59:45 -05:00
pub(crate) value: String,
}
to_wasm!(
2023-12-29 12:49:43 -05:00
WasmComment,
2023-12-25 11:51:39 -05:00
Comment<'s>,
2023-12-25 12:32:35 -05:00
original,
wasm_context,
{ WasmAstNode::Comment(original) },
2023-12-29 21:59:45 -05:00
{ "comment".into() },
{
Ok((
Vec::new(),
WasmComment {
2023-12-29 21:59:45 -05:00
value: original.get_value(),
},
))
}
);