diff --git a/src/wasm/table_row.rs b/src/wasm/table_row.rs index e3ee3f15..5ae71703 100644 --- a/src/wasm/table_row.rs +++ b/src/wasm/table_row.rs @@ -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::TableRow; +use crate::types::TableRowType; use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Debug, Serialize, Deserialize)] pub struct WasmTableRow { - #[serde(flatten)] - pub(crate) additional_properties: AdditionalProperties, + #[serde(rename = "type")] + pub(crate) row_type: String, } to_wasm!( @@ -21,7 +21,7 @@ to_wasm!( original, wasm_context, { WasmAstNode::TableRow(original) }, - { "TODO".into() }, + { "table-row".into() }, { let children = original .children @@ -36,7 +36,11 @@ to_wasm!( Ok(( children, WasmTableRow { - additional_properties: AdditionalProperties::default(), + row_type: match original.get_type() { + TableRowType::Standard => "standard", + TableRowType::Rule => "rule", + } + .to_owned(), }, )) }