Implement latex fragment.
Some checks failed
clippy Build clippy has failed
rust-build Build rust-build has failed
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-test Build rust-test has failed

This commit is contained in:
Tom Alexander 2023-12-30 12:43:57 -05:00
parent d0a008ed22
commit 3ec900c8df
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -4,15 +4,13 @@ use serde::Serialize;
use super::ast_node::WasmAstNode; use super::ast_node::WasmAstNode;
use super::macros::to_wasm; use super::macros::to_wasm;
use super::to_wasm::ToWasm; use super::to_wasm::ToWasm;
use super::AdditionalProperties;
use crate::compare::ElispFact; use crate::compare::ElispFact;
use crate::types::LatexFragment; use crate::types::LatexFragment;
use crate::wasm::to_wasm::ToWasmStandardProperties; use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct WasmLatexFragment { pub struct WasmLatexFragment {
#[serde(flatten)] pub(crate) value: String,
pub(crate) additional_properties: AdditionalProperties,
} }
to_wasm!( to_wasm!(
@ -21,12 +19,12 @@ to_wasm!(
original, original,
wasm_context, wasm_context,
{ WasmAstNode::LatexFragment(original) }, { WasmAstNode::LatexFragment(original) },
{ "TODO".into() }, { "latex-fragment".into() },
{ {
Ok(( Ok((
Vec::new(), Vec::new(),
WasmLatexFragment { WasmLatexFragment {
additional_properties: AdditionalProperties::default(), value: original.value.to_owned(),
}, },
)) ))
} }