Implement inline babel call.

This commit is contained in:
Tom Alexander 2023-12-30 15:52:48 -05:00
parent e348e7d4e3
commit 65ce116998
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 13 additions and 5 deletions

View File

@ -4,15 +4,19 @@ 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::InlineBabelCall;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmInlineBabelCall {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
pub(crate) call: String,
#[serde(rename = "inside-header")]
pub(crate) inside_header: Option<String>,
pub(crate) arguments: Option<String>,
#[serde(rename = "end-header")]
pub(crate) end_header: Option<String>,
pub(crate) value: String,
}
to_wasm!(
@ -21,12 +25,16 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::InlineBabelCall(original) },
{ "TODO".into() },
{ "inline-babel-call".into() },
{
Ok((
Vec::new(),
WasmInlineBabelCall {
additional_properties: AdditionalProperties::default(),
call: original.call.to_owned(),
inside_header: original.inside_header.map(|s| s.to_owned()),
arguments: original.arguments.map(|s| s.to_owned()),
end_header: original.end_header.map(|s| s.to_owned()),
value: original.value.to_owned(),
},
))
}