use serde::Deserialize; use serde::Serialize; use super::ast_node::WasmAstNode; use super::macros::to_wasm; use super::to_wasm::ToWasm; use crate::types::RadioTarget; use crate::util::elisp_fact::ElispFact; use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Debug, Serialize, Deserialize)] pub struct WasmRadioTarget { pub(crate) value: String, } to_wasm!( WasmRadioTarget, RadioTarget<'s>, original, wasm_context, { WasmAstNode::RadioTarget(original) }, { "radio-target".into() }, { let children = original .children .iter() .map(|child| { child .to_wasm(wasm_context.clone()) .map(Into::::into) }) .collect::, _>>()?; Ok(( children, WasmRadioTarget { value: original.value.to_owned(), }, )) } );