Implement subscript and superscript.
Some checks failed
clippy Build clippy has failed
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has failed
rust-test Build rust-test has failed

This commit is contained in:
Tom Alexander 2023-12-29 23:46:47 -05:00
parent 24c8ac8e21
commit ebe12d96c1
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 8 additions and 10 deletions

View File

@ -4,15 +4,14 @@ 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::Subscript;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmSubscript {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
#[serde(rename = "use-brackets-p")]
pub(crate) use_brackets: bool,
}
to_wasm!(
@ -21,7 +20,7 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::Subscript(original) },
{ "TODO".into() },
{ "subscript".into() },
{
let children = original
.children
@ -36,7 +35,7 @@ to_wasm!(
Ok((
children,
WasmSubscript {
additional_properties: AdditionalProperties::default(),
use_brackets: original.use_brackets,
},
))
}

View File

@ -4,15 +4,14 @@ 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::Superscript;
use crate::wasm::to_wasm::ToWasmStandardProperties;
#[derive(Debug, Serialize, Deserialize)]
pub struct WasmSuperscript {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
#[serde(rename = "use-brackets-p")]
pub(crate) use_brackets: bool,
}
to_wasm!(
@ -21,7 +20,7 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::Superscript(original) },
{ "TODO".into() },
{ "superscript".into() },
{
let children = original
.children
@ -36,7 +35,7 @@ to_wasm!(
Ok((
children,
WasmSuperscript {
additional_properties: AdditionalProperties::default(),
use_brackets: original.use_brackets,
},
))
}