36 lines
912 B
Rust
36 lines
912 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::compare::ElispFact;
|
|
use crate::types::InlineSourceBlock;
|
|
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
pub struct WasmInlineSourceBlock {
|
|
pub(crate) language: String,
|
|
pub(crate) value: String,
|
|
pub(crate) parameters: Option<String>,
|
|
}
|
|
|
|
to_wasm!(
|
|
WasmInlineSourceBlock,
|
|
InlineSourceBlock<'s>,
|
|
original,
|
|
wasm_context,
|
|
{ WasmAstNode::InlineSourceBlock(original) },
|
|
{ "inline-src-block".into() },
|
|
{
|
|
Ok((
|
|
Vec::new(),
|
|
WasmInlineSourceBlock {
|
|
language: original.language.to_owned(),
|
|
value: original.value.to_owned(),
|
|
parameters: original.parameters.map(str::to_owned),
|
|
},
|
|
))
|
|
}
|
|
);
|