Compare commits
6 Commits
3ec900c8df
...
e7742b529a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e7742b529a | ||
![]() |
8eba0c4923 | ||
![]() |
e0c0070a13 | ||
![]() |
65ce116998 | ||
![]() |
e348e7d4e3 | ||
![]() |
492090470c |
@ -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::ExportSnippet;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmExportSnippet {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
#[serde(rename = "back-end")]
|
||||
pub(crate) backend: String,
|
||||
pub(crate) value: Option<String>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +21,13 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::ExportSnippet(original) },
|
||||
{ "TODO".into() },
|
||||
{ "export-snippet".into() },
|
||||
{
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmExportSnippet {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
backend: original.backend.to_owned(),
|
||||
value: original.contents.map(|s| s.to_owned()),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -2,17 +2,22 @@ use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::headline::Noop;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::FootnoteDefinition;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmFootnoteDefinition {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) label: String,
|
||||
#[serde(rename = "pre-blank")]
|
||||
pub(crate) pre_blank: Noop,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,8 +26,12 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::FootnoteDefinition(original) },
|
||||
{ "TODO".into() },
|
||||
{ "footnote-definition".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
let children = original
|
||||
.children
|
||||
.iter()
|
||||
@ -36,7 +45,9 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmFootnoteDefinition {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
additional_properties,
|
||||
label: original.label.to_owned(),
|
||||
pre_blank: Noop {},
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -4,15 +4,16 @@ 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::FootnoteReference;
|
||||
use crate::types::FootnoteReferenceType;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmFootnoteReference {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) label: Option<String>,
|
||||
#[serde(rename = "type")]
|
||||
pub(crate) footnote_reference_type: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +22,27 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::FootnoteReference(original) },
|
||||
{ "TODO".into() },
|
||||
{ "footnote-reference".into() },
|
||||
{
|
||||
let children = original
|
||||
.definition
|
||||
.iter()
|
||||
.map(|child| {
|
||||
child
|
||||
.to_wasm(wasm_context.clone())
|
||||
.map(Into::<WasmAstNode>::into)
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok((
|
||||
Vec::new(),
|
||||
children,
|
||||
WasmFootnoteReference {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
label: original.label.map(|s| s.to_owned()),
|
||||
footnote_reference_type: match original.get_type() {
|
||||
FootnoteReferenceType::Standard => "standard",
|
||||
FootnoteReferenceType::Inline => "inline",
|
||||
}
|
||||
.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -4,15 +4,19 @@ 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::InlineBabelCall;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmInlineBabelCall {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) call: String,
|
||||
#[serde(rename = "inside-header")]
|
||||
pub(crate) inside_header: Option<String>,
|
||||
pub(crate) arguments: Option<String>,
|
||||
#[serde(rename = "end-header")]
|
||||
pub(crate) end_header: Option<String>,
|
||||
pub(crate) value: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +25,16 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::InlineBabelCall(original) },
|
||||
{ "TODO".into() },
|
||||
{ "inline-babel-call".into() },
|
||||
{
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmInlineBabelCall {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
call: original.call.to_owned(),
|
||||
inside_header: original.inside_header.map(|s| s.to_owned()),
|
||||
arguments: original.arguments.map(|s| s.to_owned()),
|
||||
end_header: original.end_header.map(|s| s.to_owned()),
|
||||
value: original.value.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -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::InlineSourceBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmInlineSourceBlock {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) language: String,
|
||||
pub(crate) value: String,
|
||||
pub(crate) parameters: Option<String>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +21,14 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::InlineSourceBlock(original) },
|
||||
{ "TODO".into() },
|
||||
{ "inline-src-block".into() },
|
||||
{
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmInlineSourceBlock {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
language: original.language.to_owned(),
|
||||
value: original.value.to_owned(),
|
||||
parameters: original.parameters.map(str::to_owned),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::types::LatexEnvironment;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
@ -13,6 +14,7 @@ use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
pub struct WasmLatexEnvironment {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) value: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +23,17 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::LatexEnvironment(original) },
|
||||
{ "TODO".into() },
|
||||
{ "latex-environment".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmLatexEnvironment {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
additional_properties,
|
||||
value: original.value.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user