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::Subscript; use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Debug, Serialize, Deserialize)] pub struct WasmSubscript { #[serde(rename = "use-brackets-p")] pub(crate) use_brackets: bool, } to_wasm!( WasmSubscript, Subscript<'s>, original, wasm_context, { WasmAstNode::Subscript(original) }, { "subscript".into() }, { let children = original .children .iter() .map(|child| { child .to_wasm(wasm_context.clone()) .map(Into::::into) }) .collect::, _>>()?; Ok(( children, WasmSubscript { use_brackets: original.use_brackets, }, )) } );