Implement table row.
This commit is contained in:
parent
4e18cbafba
commit
e0fbf17226
@ -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…
Reference in New Issue
Block a user