Implement table row.

main
Tom Alexander 4 months ago
parent 4e18cbafba
commit e0fbf17226
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::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(),
},
))
}

Loading…
Cancel
Save