diff --git a/src/wasm/entity.rs b/src/wasm/entity.rs index 112e0e45..78f82272 100644 --- a/src/wasm/entity.rs +++ b/src/wasm/entity.rs @@ -2,17 +2,26 @@ use serde::Deserialize; use serde::Serialize; use super::ast_node::WasmAstNode; +use super::headline::Noop; use super::macros::to_wasm; use super::to_wasm::ToWasm; -use super::AdditionalProperties; use crate::compare::ElispFact; use crate::types::Entity; use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Debug, Serialize, Deserialize)] pub struct WasmEntity { - #[serde(flatten)] - pub(crate) additional_properties: AdditionalProperties, + pub(crate) name: String, + pub(crate) latex: String, + #[serde(rename = "latex-math-p")] + pub(crate) latex_math_mode: bool, + pub(crate) html: String, + pub(crate) ascii: String, + pub(crate) latin1: Noop, + #[serde(rename = "utf-8")] + pub(crate) utf8: String, + #[serde(rename = "use-brackets-p")] + pub(crate) use_brackets: bool, } to_wasm!( @@ -21,12 +30,19 @@ to_wasm!( original, wasm_context, { WasmAstNode::Entity(original) }, - { "TODO".into() }, + { "entity".into() }, { Ok(( Vec::new(), WasmEntity { - additional_properties: AdditionalProperties::default(), + name: original.name.to_owned(), + latex: original.latex.to_owned(), + latex_math_mode: original.latex_math_mode, + html: original.html.to_owned(), + ascii: original.ascii.to_owned(), + latin1: Noop {}, + utf8: original.utf8.to_owned(), + use_brackets: original.use_brackets, }, )) }