Implement babel call.

main
Tom Alexander 5 months ago
parent c46a935cfc
commit 46c36d7f3e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -7,12 +7,20 @@ use super::to_wasm::ToWasm;
use super::AdditionalProperties;
use crate::compare::ElispFact;
use crate::types::BabelCall;
use crate::types::GetAffiliatedKeywords;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmBabelCall {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
pub(crate) call: Option<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 +29,21 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::BabelCall(original) },
{ "TODO".into() },
{ "babel-call".into() },
{
let additional_properties = original
.get_affiliated_keywords()
.to_wasm(wasm_context.clone())?;
Ok((
Vec::new(),
WasmBabelCall {
additional_properties: AdditionalProperties::default(),
additional_properties,
call: original.call.map(|s| s.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(),
},
))
}

Loading…
Cancel
Save