44 lines
1.1 KiB
Rust
44 lines
1.1 KiB
Rust
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
|
|
use super::ast_node::WasmAstNode;
|
|
use super::macros::to_wasm;
|
|
use super::to_wasm::ToWasm;
|
|
use super::AdditionalProperties;
|
|
use crate::types::ExportBlock;
|
|
use crate::types::GetAffiliatedKeywords;
|
|
use crate::util::elisp_fact::ElispFact;
|
|
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
pub struct WasmExportBlock {
|
|
#[serde(flatten)]
|
|
pub(crate) additional_properties: AdditionalProperties,
|
|
#[serde(rename = "type")]
|
|
pub(crate) export_type: Option<String>,
|
|
pub(crate) value: String,
|
|
}
|
|
|
|
to_wasm!(
|
|
WasmExportBlock,
|
|
ExportBlock<'s>,
|
|
original,
|
|
wasm_context,
|
|
{ WasmAstNode::ExportBlock(original) },
|
|
{ "export-block".into() },
|
|
{
|
|
let additional_properties = original
|
|
.get_affiliated_keywords()
|
|
.to_wasm(wasm_context.clone())?;
|
|
|
|
Ok((
|
|
Vec::new(),
|
|
WasmExportBlock {
|
|
additional_properties,
|
|
export_type: original.get_export_type(),
|
|
value: original.get_value().into_owned(),
|
|
},
|
|
))
|
|
}
|
|
);
|