Implement subscript and superscript.
This commit is contained in:
parent
24c8ac8e21
commit
ebe12d96c1
@ -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,
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user