Add a lifetime for data in the parsed result but not from the source.
This commit is contained in:
parent
abf066701e
commit
1a70b3d2c0
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::AngleLink;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::AngleLink;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmAngleLink<'s> {
|
||||
pub(crate) struct WasmAngleLink<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmAngleLink<'s>,
|
||||
WasmAngleLink<'s, 'p>,
|
||||
AngleLink<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -61,68 +61,68 @@ use super::verse_block::WasmVerseBlock;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum WasmAstNode<'s> {
|
||||
pub enum WasmAstNode<'s, 'p> {
|
||||
// Document Nodes
|
||||
Document(WasmDocument<'s>),
|
||||
Headline(WasmHeadline<'s>),
|
||||
Section(WasmSection<'s>),
|
||||
Document(WasmDocument<'s, 'p>),
|
||||
Headline(WasmHeadline<'s, 'p>),
|
||||
Section(WasmSection<'s, 'p>),
|
||||
// Elements
|
||||
Paragraph(WasmParagraph<'s>),
|
||||
PlainList(WasmPlainList<'s>),
|
||||
PlainListItem(WasmPlainListItem<'s>),
|
||||
CenterBlock(WasmCenterBlock<'s>),
|
||||
QuoteBlock(WasmQuoteBlock<'s>),
|
||||
SpecialBlock(WasmSpecialBlock<'s>),
|
||||
DynamicBlock(WasmDynamicBlock<'s>),
|
||||
FootnoteDefinition(WasmFootnoteDefinition<'s>),
|
||||
Comment(WasmComment<'s>),
|
||||
Drawer(WasmDrawer<'s>),
|
||||
PropertyDrawer(WasmPropertyDrawer<'s>),
|
||||
NodeProperty(WasmNodeProperty<'s>),
|
||||
Table(WasmTable<'s>),
|
||||
TableRow(WasmTableRow<'s>),
|
||||
VerseBlock(WasmVerseBlock<'s>),
|
||||
CommentBlock(WasmCommentBlock<'s>),
|
||||
ExampleBlock(WasmExampleBlock<'s>),
|
||||
ExportBlock(WasmExportBlock<'s>),
|
||||
SrcBlock(WasmSrcBlock<'s>),
|
||||
Clock(WasmClock<'s>),
|
||||
DiarySexp(WasmDiarySexp<'s>),
|
||||
Planning(WasmPlanning<'s>),
|
||||
FixedWidthArea(WasmFixedWidthArea<'s>),
|
||||
HorizontalRule(WasmHorizontalRule<'s>),
|
||||
Keyword(WasmKeyword<'s>),
|
||||
BabelCall(WasmBabelCall<'s>),
|
||||
LatexEnvironment(WasmLatexEnvironment<'s>),
|
||||
Paragraph(WasmParagraph<'s, 'p>),
|
||||
PlainList(WasmPlainList<'s, 'p>),
|
||||
PlainListItem(WasmPlainListItem<'s, 'p>),
|
||||
CenterBlock(WasmCenterBlock<'s, 'p>),
|
||||
QuoteBlock(WasmQuoteBlock<'s, 'p>),
|
||||
SpecialBlock(WasmSpecialBlock<'s, 'p>),
|
||||
DynamicBlock(WasmDynamicBlock<'s, 'p>),
|
||||
FootnoteDefinition(WasmFootnoteDefinition<'s, 'p>),
|
||||
Comment(WasmComment<'s, 'p>),
|
||||
Drawer(WasmDrawer<'s, 'p>),
|
||||
PropertyDrawer(WasmPropertyDrawer<'s, 'p>),
|
||||
NodeProperty(WasmNodeProperty<'s, 'p>),
|
||||
Table(WasmTable<'s, 'p>),
|
||||
TableRow(WasmTableRow<'s, 'p>),
|
||||
VerseBlock(WasmVerseBlock<'s, 'p>),
|
||||
CommentBlock(WasmCommentBlock<'s, 'p>),
|
||||
ExampleBlock(WasmExampleBlock<'s, 'p>),
|
||||
ExportBlock(WasmExportBlock<'s, 'p>),
|
||||
SrcBlock(WasmSrcBlock<'s, 'p>),
|
||||
Clock(WasmClock<'s, 'p>),
|
||||
DiarySexp(WasmDiarySexp<'s, 'p>),
|
||||
Planning(WasmPlanning<'s, 'p>),
|
||||
FixedWidthArea(WasmFixedWidthArea<'s, 'p>),
|
||||
HorizontalRule(WasmHorizontalRule<'s, 'p>),
|
||||
Keyword(WasmKeyword<'s, 'p>),
|
||||
BabelCall(WasmBabelCall<'s, 'p>),
|
||||
LatexEnvironment(WasmLatexEnvironment<'s, 'p>),
|
||||
// Objects
|
||||
Bold(WasmBold<'s>),
|
||||
Italic(WasmItalic<'s>),
|
||||
Underline(WasmUnderline<'s>),
|
||||
StrikeThrough(WasmStrikeThrough<'s>),
|
||||
Code(WasmCode<'s>),
|
||||
Verbatim(WasmVerbatim<'s>),
|
||||
PlainText(WasmPlainText<'s>),
|
||||
RegularLink(WasmRegularLink<'s>),
|
||||
RadioLink(WasmRadioLink<'s>),
|
||||
RadioTarget(WasmRadioTarget<'s>),
|
||||
PlainLink(WasmPlainLink<'s>),
|
||||
AngleLink(WasmAngleLink<'s>),
|
||||
OrgMacro(WasmOrgMacro<'s>),
|
||||
Entity(WasmEntity<'s>),
|
||||
LatexFragment(WasmLatexFragment<'s>),
|
||||
ExportSnippet(WasmExportSnippet<'s>),
|
||||
FootnoteReference(WasmFootnoteReference<'s>),
|
||||
Citation(WasmCitation<'s>),
|
||||
CitationReference(WasmCitationReference<'s>),
|
||||
InlineBabelCall(WasmInlineBabelCall<'s>),
|
||||
InlineSourceBlock(WasmInlineSourceBlock<'s>),
|
||||
LineBreak(WasmLineBreak<'s>),
|
||||
Target(WasmTarget<'s>),
|
||||
StatisticsCookie(WasmStatisticsCookie<'s>),
|
||||
Subscript(WasmSubscript<'s>),
|
||||
Superscript(WasmSuperscript<'s>),
|
||||
TableCell(WasmTableCell<'s>),
|
||||
Timestamp(WasmTimestamp<'s>),
|
||||
Bold(WasmBold<'s, 'p>),
|
||||
Italic(WasmItalic<'s, 'p>),
|
||||
Underline(WasmUnderline<'s, 'p>),
|
||||
StrikeThrough(WasmStrikeThrough<'s, 'p>),
|
||||
Code(WasmCode<'s, 'p>),
|
||||
Verbatim(WasmVerbatim<'s, 'p>),
|
||||
PlainText(WasmPlainText<'s, 'p>),
|
||||
RegularLink(WasmRegularLink<'s, 'p>),
|
||||
RadioLink(WasmRadioLink<'s, 'p>),
|
||||
RadioTarget(WasmRadioTarget<'s, 'p>),
|
||||
PlainLink(WasmPlainLink<'s, 'p>),
|
||||
AngleLink(WasmAngleLink<'s, 'p>),
|
||||
OrgMacro(WasmOrgMacro<'s, 'p>),
|
||||
Entity(WasmEntity<'s, 'p>),
|
||||
LatexFragment(WasmLatexFragment<'s, 'p>),
|
||||
ExportSnippet(WasmExportSnippet<'s, 'p>),
|
||||
FootnoteReference(WasmFootnoteReference<'s, 'p>),
|
||||
Citation(WasmCitation<'s, 'p>),
|
||||
CitationReference(WasmCitationReference<'s, 'p>),
|
||||
InlineBabelCall(WasmInlineBabelCall<'s, 'p>),
|
||||
InlineSourceBlock(WasmInlineSourceBlock<'s, 'p>),
|
||||
LineBreak(WasmLineBreak<'s, 'p>),
|
||||
Target(WasmTarget<'s, 'p>),
|
||||
StatisticsCookie(WasmStatisticsCookie<'s, 'p>),
|
||||
Subscript(WasmSubscript<'s, 'p>),
|
||||
Superscript(WasmSuperscript<'s, 'p>),
|
||||
TableCell(WasmTableCell<'s, 'p>),
|
||||
Timestamp(WasmTimestamp<'s, 'p>),
|
||||
}
|
||||
|
||||
impl<'s> WasmAstNode<'s> {}
|
||||
impl<'s, 'p> WasmAstNode<'s, 'p> {}
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::BabelCall;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::BabelCall;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmBabelCall<'s> {
|
||||
pub(crate) struct WasmBabelCall<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmBabelCall<'s>,
|
||||
WasmBabelCall<'s, 'p>,
|
||||
BabelCall<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,6 +1,5 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
@ -12,14 +11,14 @@ use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmBold<'s> {
|
||||
pub(crate) struct WasmBold<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmBold<'s>,
|
||||
WasmBold<'s, 'p>,
|
||||
Bold<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::CenterBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::CenterBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmCenterBlock<'s> {
|
||||
pub(crate) struct WasmCenterBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmCenterBlock<'s>,
|
||||
WasmCenterBlock<'s, 'p>,
|
||||
CenterBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Citation;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Citation;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmCitation<'s> {
|
||||
pub(crate) struct WasmCitation<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmCitation<'s>,
|
||||
WasmCitation<'s, 'p>,
|
||||
Citation<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::CitationReference;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::CitationReference;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmCitationReference<'s> {
|
||||
pub(crate) struct WasmCitationReference<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmCitationReference<'s>,
|
||||
WasmCitationReference<'s, 'p>,
|
||||
CitationReference<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Clock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Clock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmClock<'s> {
|
||||
pub(crate) struct WasmClock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmClock<'s>,
|
||||
WasmClock<'s, 'p>,
|
||||
Clock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Code;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Code;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmCode<'s> {
|
||||
pub(crate) struct WasmCode<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmCode<'s>,
|
||||
WasmCode<'s, 'p>,
|
||||
Code<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Comment;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Comment;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmComment<'s> {
|
||||
pub(crate) struct WasmComment<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmComment<'s>,
|
||||
WasmComment<'s, 'p>,
|
||||
Comment<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::CommentBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::CommentBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmCommentBlock<'s> {
|
||||
pub(crate) struct WasmCommentBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmCommentBlock<'s>,
|
||||
WasmCommentBlock<'s, 'p>,
|
||||
CommentBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::DiarySexp;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::DiarySexp;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmDiarySexp<'s> {
|
||||
pub(crate) struct WasmDiarySexp<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmDiarySexp<'s>,
|
||||
WasmDiarySexp<'s, 'p>,
|
||||
DiarySexp<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -12,22 +12,22 @@ use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub struct WasmDocument<'s> {
|
||||
pub struct WasmDocument<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
additional_properties: Vec<(String, &'s str)>,
|
||||
children: Vec<WasmAstNode<'s>>,
|
||||
category: Option<String>,
|
||||
children: Vec<WasmAstNode<'s, 'p>>,
|
||||
category: Option<&'p str>,
|
||||
path: Option<PathBuf>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmDocument<'s>,
|
||||
WasmDocument<'s, 'p>,
|
||||
Document<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
standard_properties,
|
||||
{
|
||||
let category = original.category.clone();
|
||||
let category = original.category.as_ref().map(String::as_str);
|
||||
let path = original.path.clone();
|
||||
|
||||
let additional_properties: Vec<(String, &str)> = original
|
||||
@ -65,8 +65,8 @@ to_wasm!(
|
||||
}
|
||||
);
|
||||
|
||||
impl<'s> Into<WasmAstNode<'s>> for WasmDocument<'s> {
|
||||
fn into(self) -> WasmAstNode<'s> {
|
||||
impl<'s, 'p> Into<WasmAstNode<'s, 'p>> for WasmDocument<'s, 'p> {
|
||||
fn into(self) -> WasmAstNode<'s, 'p> {
|
||||
WasmAstNode::Document(self)
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Drawer;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Drawer;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmDrawer<'s> {
|
||||
pub(crate) struct WasmDrawer<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmDrawer<'s>,
|
||||
WasmDrawer<'s, 'p>,
|
||||
Drawer<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::DynamicBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::DynamicBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmDynamicBlock<'s> {
|
||||
pub(crate) struct WasmDynamicBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmDynamicBlock<'s>,
|
||||
WasmDynamicBlock<'s, 'p>,
|
||||
DynamicBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Entity;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Entity;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmEntity<'s> {
|
||||
pub(crate) struct WasmEntity<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmEntity<'s>,
|
||||
WasmEntity<'s, 'p>,
|
||||
Entity<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::ExampleBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::ExampleBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmExampleBlock<'s> {
|
||||
pub(crate) struct WasmExampleBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmExampleBlock<'s>,
|
||||
WasmExampleBlock<'s, 'p>,
|
||||
ExampleBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::ExportBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::ExportBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmExportBlock<'s> {
|
||||
pub(crate) struct WasmExportBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmExportBlock<'s>,
|
||||
WasmExportBlock<'s, 'p>,
|
||||
ExportBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::ExportSnippet;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::ExportSnippet;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmExportSnippet<'s> {
|
||||
pub(crate) struct WasmExportSnippet<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmExportSnippet<'s>,
|
||||
WasmExportSnippet<'s, 'p>,
|
||||
ExportSnippet<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::FixedWidthArea;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::FixedWidthArea;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmFixedWidthArea<'s> {
|
||||
pub(crate) struct WasmFixedWidthArea<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmFixedWidthArea<'s>,
|
||||
WasmFixedWidthArea<'s, 'p>,
|
||||
FixedWidthArea<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::FootnoteDefinition;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::FootnoteDefinition;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmFootnoteDefinition<'s> {
|
||||
pub(crate) struct WasmFootnoteDefinition<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmFootnoteDefinition<'s>,
|
||||
WasmFootnoteDefinition<'s, 'p>,
|
||||
FootnoteDefinition<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::FootnoteReference;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::FootnoteReference;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmFootnoteReference<'s> {
|
||||
pub(crate) struct WasmFootnoteReference<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmFootnoteReference<'s>,
|
||||
WasmFootnoteReference<'s, 'p>,
|
||||
FootnoteReference<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,25 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Heading;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Heading;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "headline")]
|
||||
pub(crate) struct WasmHeadline<'s> {
|
||||
pub(crate) struct WasmHeadline<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmHeadline<'s>,
|
||||
WasmHeadline<'s, 'p>,
|
||||
Heading<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
@ -33,8 +33,8 @@ to_wasm!(
|
||||
}
|
||||
);
|
||||
|
||||
impl<'s> Into<WasmAstNode<'s>> for WasmHeadline<'s> {
|
||||
fn into(self) -> WasmAstNode<'s> {
|
||||
impl<'s, 'p> Into<WasmAstNode<'s, 'p>> for WasmHeadline<'s, 'p> {
|
||||
fn into(self) -> WasmAstNode<'s, 'p> {
|
||||
WasmAstNode::Headline(self)
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::HorizontalRule;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::HorizontalRule;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmHorizontalRule<'s> {
|
||||
pub(crate) struct WasmHorizontalRule<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmHorizontalRule<'s>,
|
||||
WasmHorizontalRule<'s, 'p>,
|
||||
HorizontalRule<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::InlineBabelCall;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::InlineBabelCall;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmInlineBabelCall<'s> {
|
||||
pub(crate) struct WasmInlineBabelCall<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmInlineBabelCall<'s>,
|
||||
WasmInlineBabelCall<'s, 'p>,
|
||||
InlineBabelCall<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::InlineSourceBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::InlineSourceBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmInlineSourceBlock<'s> {
|
||||
pub(crate) struct WasmInlineSourceBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmInlineSourceBlock<'s>,
|
||||
WasmInlineSourceBlock<'s, 'p>,
|
||||
InlineSourceBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Italic;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Italic;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmItalic<'s> {
|
||||
pub(crate) struct WasmItalic<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmItalic<'s>,
|
||||
WasmItalic<'s, 'p>,
|
||||
Italic<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Keyword;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Keyword;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmKeyword<'s> {
|
||||
pub(crate) struct WasmKeyword<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmKeyword<'s>,
|
||||
WasmKeyword<'s, 'p>,
|
||||
Keyword<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::LatexEnvironment;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::LatexEnvironment;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmLatexEnvironment<'s> {
|
||||
pub(crate) struct WasmLatexEnvironment<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmLatexEnvironment<'s>,
|
||||
WasmLatexEnvironment<'s, 'p>,
|
||||
LatexEnvironment<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::LatexFragment;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::LatexFragment;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmLatexFragment<'s> {
|
||||
pub(crate) struct WasmLatexFragment<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmLatexFragment<'s>,
|
||||
WasmLatexFragment<'s, 'p>,
|
||||
LatexFragment<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::LineBreak;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::LineBreak;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmLineBreak<'s> {
|
||||
pub(crate) struct WasmLineBreak<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmLineBreak<'s>,
|
||||
WasmLineBreak<'s, 'p>,
|
||||
LineBreak<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -3,7 +3,7 @@
|
||||
/// This exists to make changing the type signature easier.
|
||||
macro_rules! to_wasm {
|
||||
($ostruct:ty, $istruct:ty, $original:ident, $wasm_context:ident, $standard_properties:ident, $fnbody:tt) => {
|
||||
impl<'s> ToWasm for $istruct {
|
||||
impl<'s, 'p> ToWasm for $istruct {
|
||||
type Output = $ostruct;
|
||||
|
||||
fn to_wasm(
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::NodeProperty;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::NodeProperty;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmNodeProperty<'s> {
|
||||
pub(crate) struct WasmNodeProperty<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmNodeProperty<'s>,
|
||||
WasmNodeProperty<'s, 'p>,
|
||||
NodeProperty<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::OrgMacro;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::OrgMacro;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmOrgMacro<'s> {
|
||||
pub(crate) struct WasmOrgMacro<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmOrgMacro<'s>,
|
||||
WasmOrgMacro<'s, 'p>,
|
||||
OrgMacro<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Paragraph;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Paragraph;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmParagraph<'s> {
|
||||
pub(crate) struct WasmParagraph<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmParagraph<'s>,
|
||||
WasmParagraph<'s, 'p>,
|
||||
Paragraph<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -8,15 +8,15 @@ use crate::settings::GlobalSettings;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "status", content = "content")]
|
||||
pub enum ParseResult<'s> {
|
||||
pub enum ParseResult<'s, 'p> {
|
||||
#[serde(rename = "success")]
|
||||
Success(WasmDocument<'s>),
|
||||
Success(WasmDocument<'s, 'p>),
|
||||
|
||||
#[serde(rename = "error")]
|
||||
Error(String),
|
||||
}
|
||||
|
||||
pub fn wasm_parse_org(org_contents: &str) -> ParseResult<'_> {
|
||||
pub fn wasm_parse_org(org_contents: &str) -> ParseResult<'_, '_> {
|
||||
let global_settings = GlobalSettings::default();
|
||||
let to_wasm_context = ToWasmContext::new(org_contents);
|
||||
let rust_parsed = match parse_with_settings(org_contents, &global_settings)
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::PlainLink;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::PlainLink;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmPlainLink<'s> {
|
||||
pub(crate) struct WasmPlainLink<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPlainLink<'s>,
|
||||
WasmPlainLink<'s, 'p>,
|
||||
PlainLink<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::PlainList;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::PlainList;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmPlainList<'s> {
|
||||
pub(crate) struct WasmPlainList<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPlainList<'s>,
|
||||
WasmPlainList<'s, 'p>,
|
||||
PlainList<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::PlainListItem;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::PlainListItem;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmPlainListItem<'s> {
|
||||
pub(crate) struct WasmPlainListItem<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPlainListItem<'s>,
|
||||
WasmPlainListItem<'s, 'p>,
|
||||
PlainListItem<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::PlainText;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::PlainText;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmPlainText<'s> {
|
||||
pub(crate) struct WasmPlainText<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPlainText<'s>,
|
||||
WasmPlainText<'s, 'p>,
|
||||
PlainText<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Planning;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Planning;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmPlanning<'s> {
|
||||
pub(crate) struct WasmPlanning<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPlanning<'s>,
|
||||
WasmPlanning<'s, 'p>,
|
||||
Planning<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::PropertyDrawer;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::PropertyDrawer;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmPropertyDrawer<'s> {
|
||||
pub(crate) struct WasmPropertyDrawer<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPropertyDrawer<'s>,
|
||||
WasmPropertyDrawer<'s, 'p>,
|
||||
PropertyDrawer<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::QuoteBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::QuoteBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmQuoteBlock<'s> {
|
||||
pub(crate) struct WasmQuoteBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmQuoteBlock<'s>,
|
||||
WasmQuoteBlock<'s, 'p>,
|
||||
QuoteBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::RadioLink;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::RadioLink;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmRadioLink<'s> {
|
||||
pub(crate) struct WasmRadioLink<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmRadioLink<'s>,
|
||||
WasmRadioLink<'s, 'p>,
|
||||
RadioLink<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::RadioTarget;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::RadioTarget;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmRadioTarget<'s> {
|
||||
pub(crate) struct WasmRadioTarget<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmRadioTarget<'s>,
|
||||
WasmRadioTarget<'s, 'p>,
|
||||
RadioTarget<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::RegularLink;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::RegularLink;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmRegularLink<'s> {
|
||||
pub(crate) struct WasmRegularLink<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmRegularLink<'s>,
|
||||
WasmRegularLink<'s, 'p>,
|
||||
RegularLink<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,25 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Section;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Section;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "section")]
|
||||
pub(crate) struct WasmSection<'s> {
|
||||
pub(crate) struct WasmSection<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmSection<'s>,
|
||||
WasmSection<'s, 'p>,
|
||||
Section<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
@ -33,8 +33,8 @@ to_wasm!(
|
||||
}
|
||||
);
|
||||
|
||||
impl<'s> Into<WasmAstNode<'s>> for WasmSection<'s> {
|
||||
fn into(self) -> WasmAstNode<'s> {
|
||||
impl<'s, 'p> Into<WasmAstNode<'s, 'p>> for WasmSection<'s, 'p> {
|
||||
fn into(self) -> WasmAstNode<'s, 'p> {
|
||||
WasmAstNode::Section(self)
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::SpecialBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::SpecialBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmSpecialBlock<'s> {
|
||||
pub(crate) struct WasmSpecialBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmSpecialBlock<'s>,
|
||||
WasmSpecialBlock<'s, 'p>,
|
||||
SpecialBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::SrcBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::SrcBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmSrcBlock<'s> {
|
||||
pub(crate) struct WasmSrcBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmSrcBlock<'s>,
|
||||
WasmSrcBlock<'s, 'p>,
|
||||
SrcBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,10 +1,9 @@
|
||||
use crate::types::PostBlank;
|
||||
use crate::types::StandardProperties;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::to_wasm::ToWasmContext;
|
||||
use super::to_wasm::ToWasmStandardProperties;
|
||||
use crate::types::PostBlank;
|
||||
use crate::types::StandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub(crate) struct WasmStandardProperties {
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::StatisticsCookie;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::StatisticsCookie;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmStatisticsCookie<'s> {
|
||||
pub(crate) struct WasmStatisticsCookie<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmStatisticsCookie<'s>,
|
||||
WasmStatisticsCookie<'s, 'p>,
|
||||
StatisticsCookie<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::StrikeThrough;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::StrikeThrough;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmStrikeThrough<'s> {
|
||||
pub(crate) struct WasmStrikeThrough<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmStrikeThrough<'s>,
|
||||
WasmStrikeThrough<'s, 'p>,
|
||||
StrikeThrough<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Subscript;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Subscript;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmSubscript<'s> {
|
||||
pub(crate) struct WasmSubscript<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmSubscript<'s>,
|
||||
WasmSubscript<'s, 'p>,
|
||||
Subscript<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Superscript;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Superscript;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmSuperscript<'s> {
|
||||
pub(crate) struct WasmSuperscript<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmSuperscript<'s>,
|
||||
WasmSuperscript<'s, 'p>,
|
||||
Superscript<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Table;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Table;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmTable<'s> {
|
||||
pub(crate) struct WasmTable<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmTable<'s>,
|
||||
WasmTable<'s, 'p>,
|
||||
Table<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::TableCell;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::TableCell;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmTableCell<'s> {
|
||||
pub(crate) struct WasmTableCell<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmTableCell<'s>,
|
||||
WasmTableCell<'s, 'p>,
|
||||
TableCell<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::TableRow;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::TableRow;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmTableRow<'s> {
|
||||
pub(crate) struct WasmTableRow<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmTableRow<'s>,
|
||||
WasmTableRow<'s, 'p>,
|
||||
TableRow<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Target;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Target;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmTarget<'s> {
|
||||
pub(crate) struct WasmTarget<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmTarget<'s>,
|
||||
WasmTarget<'s, 'p>,
|
||||
Target<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Timestamp;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Timestamp;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmTimestamp<'s> {
|
||||
pub(crate) struct WasmTimestamp<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmTimestamp<'s>,
|
||||
WasmTimestamp<'s, 'p>,
|
||||
Timestamp<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Underline;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Underline;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmUnderline<'s> {
|
||||
pub(crate) struct WasmUnderline<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmUnderline<'s>,
|
||||
WasmUnderline<'s, 'p>,
|
||||
Underline<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::Verbatim;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::Verbatim;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmVerbatim<'s> {
|
||||
pub(crate) struct WasmVerbatim<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmVerbatim<'s>,
|
||||
WasmVerbatim<'s, 'p>,
|
||||
Verbatim<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -1,25 +1,24 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::types::VerseBlock;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::macros::to_wasm;
|
||||
use super::standard_properties::WasmStandardProperties;
|
||||
use super::to_wasm::ToWasm;
|
||||
use crate::types::VerseBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(tag = "ast_node")]
|
||||
#[serde(rename = "org-data")]
|
||||
pub(crate) struct WasmVerseBlock<'s> {
|
||||
pub(crate) struct WasmVerseBlock<'s, 'p> {
|
||||
standard_properties: WasmStandardProperties,
|
||||
children: Vec<()>,
|
||||
phantom: PhantomData<&'s ()>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmVerseBlock<'s>,
|
||||
WasmVerseBlock<'s, 'p>,
|
||||
VerseBlock<'s>,
|
||||
original,
|
||||
wasm_context,
|
||||
|
@ -4,10 +4,10 @@ use crate::compare::Token;
|
||||
use crate::wasm::WasmAstNode;
|
||||
use crate::wasm::WasmDocument;
|
||||
|
||||
pub fn wasm_compare_document<'b, 's>(
|
||||
pub fn wasm_compare_document<'b, 's, 'p>(
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
wasm: WasmDocument<'s>,
|
||||
wasm: WasmDocument<'s, 'p>,
|
||||
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
// wasm_compare_ast_node(
|
||||
todo!()
|
||||
@ -85,10 +85,10 @@ impl<'b, 's> WasmDiffEntry<'b, 's> {
|
||||
}
|
||||
}
|
||||
|
||||
fn wasm_compare_ast_node<'b, 's>(
|
||||
fn wasm_compare_ast_node<'b, 's, 'p>(
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
wasm: WasmAstNode<'s>,
|
||||
wasm: WasmAstNode<'s, 'p>,
|
||||
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
match wasm {
|
||||
WasmAstNode::Document(_) => todo!(),
|
||||
@ -153,10 +153,33 @@ fn wasm_compare_ast_node<'b, 's>(
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn impl_wasm_compare_document<'b, 's>(
|
||||
// fn wasm_compare_list<'b, 's, EI, WI, WC>(
|
||||
// source: &'s str,
|
||||
// emacs: EI,
|
||||
// wasm: WI,
|
||||
// // emacs: &'b Token<'s>,
|
||||
// // wasm: WasmDocument<'s>,
|
||||
// ) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>>
|
||||
// where
|
||||
// EI: Iterator<Item = &'b Token<'s>> + ExactSizeIterator,
|
||||
// WI: Iterator<Item = WC>,
|
||||
// WasmAstNode<'b, 's>: From<WC>,
|
||||
// {
|
||||
// let mut this_status = WasmDiffStatus::Good;
|
||||
// let mut child_status = Vec::new();
|
||||
// let mut message = None;
|
||||
|
||||
// todo!()
|
||||
// }
|
||||
|
||||
fn impl_wasm_compare_document<'b, 's, 'p>(
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
wasm: WasmDocument<'s>,
|
||||
wasm: WasmDocument<'s, 'p>,
|
||||
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
let mut this_status = WasmDiffStatus::Good;
|
||||
// let mut child_status = Vec::new();
|
||||
// let mut message = None;
|
||||
|
||||
todo!()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user