Implement export snippet.
clippy Build clippy has failed Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
rust-build Build rust-build has failed Details
rust-test Build rust-test has failed Details

main
Tom Alexander 4 months ago
parent 8eba0c4923
commit e7742b529a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -4,15 +4,15 @@ 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::ExportSnippet;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmExportSnippet {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
#[serde(rename = "back-end")]
pub(crate) backend: String,
pub(crate) value: Option<String>,
}
to_wasm!(
@ -21,12 +21,13 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::ExportSnippet(original) },
{ "TODO".into() },
{ "export-snippet".into() },
{
Ok((
Vec::new(),
WasmExportSnippet {
additional_properties: AdditionalProperties::default(),
backend: original.backend.to_owned(),
value: original.contents.map(|s| s.to_owned()),
},
))
}

Loading…
Cancel
Save