From dc012b49f5d3fb92e190d8bdd7b11c0cb61cc785 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 25 Dec 2023 11:51:39 -0500 Subject: [PATCH] Add a generic WasmAstNode enum. --- src/wasm/angle_link.rs | 10 +-- src/wasm/ast_node.rs | 124 ++++++++++++++++++++++++++++++++ src/wasm/babel_call.rs | 10 +-- src/wasm/bold.rs | 24 +++---- src/wasm/center_block.rs | 10 +-- src/wasm/citation.rs | 10 +-- src/wasm/citation_reference.rs | 10 +-- src/wasm/clock.rs | 10 +-- src/wasm/code.rs | 24 +++---- src/wasm/comment.rs | 10 +-- src/wasm/comment_block.rs | 10 +-- src/wasm/diary_sexp.rs | 10 +-- src/wasm/document.rs | 7 ++ src/wasm/drawer.rs | 10 +-- src/wasm/dynamic_block.rs | 10 +-- src/wasm/entity.rs | 10 +-- src/wasm/example_block.rs | 10 +-- src/wasm/export_block.rs | 10 +-- src/wasm/export_snippet.rs | 10 +-- src/wasm/fixed_width_area.rs | 10 +-- src/wasm/footnote_definition.rs | 10 +-- src/wasm/footnote_reference.rs | 10 +-- src/wasm/headline.rs | 10 +-- src/wasm/horizontal_rule.rs | 10 +-- src/wasm/inline_babel_call.rs | 10 +-- src/wasm/inline_source_block.rs | 10 +-- src/wasm/italic.rs | 10 +-- src/wasm/keyword.rs | 10 +-- src/wasm/latex_environment.rs | 10 +-- src/wasm/latex_fragment.rs | 10 +-- src/wasm/line_break.rs | 10 +-- src/wasm/mod.rs | 1 + src/wasm/node_property.rs | 10 +-- src/wasm/org_macro.rs | 10 +-- src/wasm/paragraph.rs | 10 +-- src/wasm/plain_link.rs | 10 +-- src/wasm/plain_list.rs | 10 +-- src/wasm/plain_list_item.rs | 10 +-- src/wasm/plain_text.rs | 10 +-- src/wasm/planning.rs | 10 +-- src/wasm/property_drawer.rs | 10 +-- src/wasm/quote_block.rs | 10 +-- src/wasm/radio_link.rs | 10 +-- src/wasm/radio_target.rs | 10 +-- src/wasm/regular_link.rs | 10 +-- src/wasm/section.rs | 10 +-- src/wasm/special_block.rs | 10 +-- src/wasm/src_block.rs | 10 +-- src/wasm/statistics_cookie.rs | 10 +-- src/wasm/strike_through.rs | 10 +-- src/wasm/subscript.rs | 10 +-- src/wasm/superscript.rs | 10 +-- src/wasm/table.rs | 10 +-- src/wasm/table_cell.rs | 10 +-- src/wasm/table_row.rs | 10 +-- src/wasm/target.rs | 10 +-- src/wasm/timestamp.rs | 10 +-- src/wasm/underline.rs | 10 +-- src/wasm/verbatim.rs | 10 +-- src/wasm/verse_block.rs | 10 +-- 60 files changed, 425 insertions(+), 305 deletions(-) create mode 100644 src/wasm/ast_node.rs diff --git a/src/wasm/angle_link.rs b/src/wasm/angle_link.rs index bbb749ea..dfa7868a 100644 --- a/src/wasm/angle_link.rs +++ b/src/wasm/angle_link.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::AngleLink; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmAngleLink<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmAngleLink<'s>, + AngleLink<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmAngleLink { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/ast_node.rs b/src/wasm/ast_node.rs new file mode 100644 index 00000000..83f43efc --- /dev/null +++ b/src/wasm/ast_node.rs @@ -0,0 +1,124 @@ +use super::angle_link::WasmAngleLink; +use super::babel_call::WasmBabelCall; +use super::bold::WasmBold; +use super::center_block::WasmCenterBlock; +use super::citation::WasmCitation; +use super::citation_reference::WasmCitationReference; +use super::clock::WasmClock; +use super::code::WasmCode; +use super::comment::WasmComment; +use super::comment_block::WasmCommentBlock; +use super::diary_sexp::WasmDiarySexp; +use super::document::WasmDocument; +use super::drawer::WasmDrawer; +use super::dynamic_block::WasmDynamicBlock; +use super::entity::WasmEntity; +use super::example_block::WasmExampleBlock; +use super::export_block::WasmExportBlock; +use super::export_snippet::WasmExportSnippet; +use super::fixed_width_area::WasmFixedWidthArea; +use super::footnote_definition::WasmFootnoteDefinition; +use super::footnote_reference::WasmFootnoteReference; +use super::headline::WasmHeadline; +use super::horizontal_rule::WasmHorizontalRule; +use super::inline_babel_call::WasmInlineBabelCall; +use super::inline_source_block::WasmInlineSourceBlock; +use super::italic::WasmItalic; +use super::keyword::WasmKeyword; +use super::latex_environment::WasmLatexEnvironment; +use super::latex_fragment::WasmLatexFragment; +use super::line_break::WasmLineBreak; +use super::node_property::WasmNodeProperty; +use super::org_macro::WasmOrgMacro; +use super::paragraph::WasmParagraph; +use super::plain_link::WasmPlainLink; +use super::plain_list::WasmPlainList; +use super::plain_list_item::WasmPlainListItem; +use super::plain_text::WasmPlainText; +use super::planning::WasmPlanning; +use super::property_drawer::WasmPropertyDrawer; +use super::quote_block::WasmQuoteBlock; +use super::radio_link::WasmRadioLink; +use super::radio_target::WasmRadioTarget; +use super::regular_link::WasmRegularLink; +use super::section::WasmSection; +use super::special_block::WasmSpecialBlock; +use super::src_block::WasmSrcBlock; +use super::statistics_cookie::WasmStatisticsCookie; +use super::strike_through::WasmStrikeThrough; +use super::subscript::WasmSubscript; +use super::superscript::WasmSuperscript; +use super::table::WasmTable; +use super::table_cell::WasmTableCell; +use super::table_row::WasmTableRow; +use super::target::WasmTarget; +use super::timestamp::WasmTimestamp; +use super::underline::WasmUnderline; +use super::verbatim::WasmVerbatim; +use super::verse_block::WasmVerseBlock; + +pub enum WasmAstNode<'s> { + // Document Nodes + Document(WasmDocument<'s>), + Heading(WasmHeadline<'s>), + Section(WasmSection<'s>), + // 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>), + // 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>), +} + +impl<'s> WasmAstNode<'s> {} diff --git a/src/wasm/babel_call.rs b/src/wasm/babel_call.rs index bbb749ea..bd71b65b 100644 --- a/src/wasm/babel_call.rs +++ b/src/wasm/babel_call.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::BabelCall; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmBabelCall<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmBabelCall<'s>, + BabelCall<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmBabelCall { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/bold.rs b/src/wasm/bold.rs index bbb749ea..e399b112 100644 --- a/src/wasm/bold.rs +++ b/src/wasm/bold.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Bold; use serde::Deserialize; use serde::Serialize; @@ -12,22 +12,16 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmBold<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } -to_wasm!( - WasmDocument<'s>, - Document<'s>, - wasm_context, - standard_properties, - { - Ok(WasmDocument { - standard_properties, - children: Vec::new(), - phantom: PhantomData, - }) - } -); +to_wasm!(WasmBold<'s>, Bold<'s>, wasm_context, standard_properties, { + Ok(WasmBold { + standard_properties, + children: Vec::new(), + phantom: PhantomData, + }) +}); diff --git a/src/wasm/center_block.rs b/src/wasm/center_block.rs index bbb749ea..29a63f28 100644 --- a/src/wasm/center_block.rs +++ b/src/wasm/center_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::CenterBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmCenterBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmCenterBlock<'s>, + CenterBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmCenterBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/citation.rs b/src/wasm/citation.rs index bbb749ea..ca7e2ec3 100644 --- a/src/wasm/citation.rs +++ b/src/wasm/citation.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Citation; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmCitation<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmCitation<'s>, + Citation<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmCitation { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/citation_reference.rs b/src/wasm/citation_reference.rs index bbb749ea..bd7752b9 100644 --- a/src/wasm/citation_reference.rs +++ b/src/wasm/citation_reference.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::CitationReference; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmCitationReference<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmCitationReference<'s>, + CitationReference<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmCitationReference { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/clock.rs b/src/wasm/clock.rs index bbb749ea..faa37043 100644 --- a/src/wasm/clock.rs +++ b/src/wasm/clock.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Clock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmClock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmClock<'s>, + Clock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmClock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/code.rs b/src/wasm/code.rs index bbb749ea..f4b119f7 100644 --- a/src/wasm/code.rs +++ b/src/wasm/code.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Code; use serde::Deserialize; use serde::Serialize; @@ -12,22 +12,16 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmCode<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } -to_wasm!( - WasmDocument<'s>, - Document<'s>, - wasm_context, - standard_properties, - { - Ok(WasmDocument { - standard_properties, - children: Vec::new(), - phantom: PhantomData, - }) - } -); +to_wasm!(WasmCode<'s>, Code<'s>, wasm_context, standard_properties, { + Ok(WasmCode { + standard_properties, + children: Vec::new(), + phantom: PhantomData, + }) +}); diff --git a/src/wasm/comment.rs b/src/wasm/comment.rs index bbb749ea..0a40eb83 100644 --- a/src/wasm/comment.rs +++ b/src/wasm/comment.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Comment; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmComment<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmComment<'s>, + Comment<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmComment { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/comment_block.rs b/src/wasm/comment_block.rs index bbb749ea..224788a2 100644 --- a/src/wasm/comment_block.rs +++ b/src/wasm/comment_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::CommentBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmCommentBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmCommentBlock<'s>, + CommentBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmCommentBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/diary_sexp.rs b/src/wasm/diary_sexp.rs index bbb749ea..bae555ed 100644 --- a/src/wasm/diary_sexp.rs +++ b/src/wasm/diary_sexp.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::DiarySexp; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmDiarySexp<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmDiarySexp<'s>, + DiarySexp<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmDiarySexp { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/document.rs b/src/wasm/document.rs index bbb749ea..c1f9ddb0 100644 --- a/src/wasm/document.rs +++ b/src/wasm/document.rs @@ -4,6 +4,7 @@ use organic::types::Document; use serde::Deserialize; use serde::Serialize; +use super::ast_node::WasmAstNode; use super::macros::to_wasm; use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; @@ -31,3 +32,9 @@ to_wasm!( }) } ); + +impl<'s> Into> for WasmDocument<'s> { + fn into(self) -> WasmAstNode<'s> { + WasmAstNode::Document(self) + } +} diff --git a/src/wasm/drawer.rs b/src/wasm/drawer.rs index bbb749ea..f8f41e9a 100644 --- a/src/wasm/drawer.rs +++ b/src/wasm/drawer.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Drawer; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmDrawer<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmDrawer<'s>, + Drawer<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmDrawer { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/dynamic_block.rs b/src/wasm/dynamic_block.rs index bbb749ea..492d3d79 100644 --- a/src/wasm/dynamic_block.rs +++ b/src/wasm/dynamic_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::DynamicBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmDynamicBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmDynamicBlock<'s>, + DynamicBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmDynamicBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/entity.rs b/src/wasm/entity.rs index bbb749ea..9e7f00e6 100644 --- a/src/wasm/entity.rs +++ b/src/wasm/entity.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Entity; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmEntity<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmEntity<'s>, + Entity<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmEntity { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/example_block.rs b/src/wasm/example_block.rs index bbb749ea..4f591393 100644 --- a/src/wasm/example_block.rs +++ b/src/wasm/example_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::ExampleBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmExampleBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmExampleBlock<'s>, + ExampleBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmExampleBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/export_block.rs b/src/wasm/export_block.rs index bbb749ea..c408f678 100644 --- a/src/wasm/export_block.rs +++ b/src/wasm/export_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::ExportBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmExportBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmExportBlock<'s>, + ExportBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmExportBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/export_snippet.rs b/src/wasm/export_snippet.rs index bbb749ea..3c788996 100644 --- a/src/wasm/export_snippet.rs +++ b/src/wasm/export_snippet.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::ExportSnippet; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmExportSnippet<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmExportSnippet<'s>, + ExportSnippet<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmExportSnippet { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/fixed_width_area.rs b/src/wasm/fixed_width_area.rs index bbb749ea..a8bd14e3 100644 --- a/src/wasm/fixed_width_area.rs +++ b/src/wasm/fixed_width_area.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::FixedWidthArea; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmFixedWidthArea<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmFixedWidthArea<'s>, + FixedWidthArea<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmFixedWidthArea { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/footnote_definition.rs b/src/wasm/footnote_definition.rs index bbb749ea..a246cd0d 100644 --- a/src/wasm/footnote_definition.rs +++ b/src/wasm/footnote_definition.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::FootnoteDefinition; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmFootnoteDefinition<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmFootnoteDefinition<'s>, + FootnoteDefinition<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmFootnoteDefinition { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/footnote_reference.rs b/src/wasm/footnote_reference.rs index bbb749ea..5f83e1c1 100644 --- a/src/wasm/footnote_reference.rs +++ b/src/wasm/footnote_reference.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::FootnoteReference; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmFootnoteReference<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmFootnoteReference<'s>, + FootnoteReference<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmFootnoteReference { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/headline.rs b/src/wasm/headline.rs index bbb749ea..9fc69196 100644 --- a/src/wasm/headline.rs +++ b/src/wasm/headline.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Heading; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmHeadline<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmHeadline<'s>, + Heading<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmHeadline { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/horizontal_rule.rs b/src/wasm/horizontal_rule.rs index bbb749ea..8ccba7d6 100644 --- a/src/wasm/horizontal_rule.rs +++ b/src/wasm/horizontal_rule.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::HorizontalRule; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmHorizontalRule<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmHorizontalRule<'s>, + HorizontalRule<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmHorizontalRule { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/inline_babel_call.rs b/src/wasm/inline_babel_call.rs index bbb749ea..69afb15b 100644 --- a/src/wasm/inline_babel_call.rs +++ b/src/wasm/inline_babel_call.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::InlineBabelCall; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmInlineBabelCall<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmInlineBabelCall<'s>, + InlineBabelCall<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmInlineBabelCall { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/inline_source_block.rs b/src/wasm/inline_source_block.rs index bbb749ea..cecd493a 100644 --- a/src/wasm/inline_source_block.rs +++ b/src/wasm/inline_source_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::InlineSourceBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmInlineSourceBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmInlineSourceBlock<'s>, + InlineSourceBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmInlineSourceBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/italic.rs b/src/wasm/italic.rs index bbb749ea..4d845a86 100644 --- a/src/wasm/italic.rs +++ b/src/wasm/italic.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Italic; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmItalic<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmItalic<'s>, + Italic<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmItalic { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/keyword.rs b/src/wasm/keyword.rs index bbb749ea..2dd9ad46 100644 --- a/src/wasm/keyword.rs +++ b/src/wasm/keyword.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Keyword; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmKeyword<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmKeyword<'s>, + Keyword<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmKeyword { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/latex_environment.rs b/src/wasm/latex_environment.rs index bbb749ea..5fda46d9 100644 --- a/src/wasm/latex_environment.rs +++ b/src/wasm/latex_environment.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::LatexEnvironment; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmLatexEnvironment<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmLatexEnvironment<'s>, + LatexEnvironment<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmLatexEnvironment { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/latex_fragment.rs b/src/wasm/latex_fragment.rs index bbb749ea..952f930c 100644 --- a/src/wasm/latex_fragment.rs +++ b/src/wasm/latex_fragment.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::LatexFragment; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmLatexFragment<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmLatexFragment<'s>, + LatexFragment<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmLatexFragment { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/line_break.rs b/src/wasm/line_break.rs index bbb749ea..8179e5f0 100644 --- a/src/wasm/line_break.rs +++ b/src/wasm/line_break.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::LineBreak; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmLineBreak<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmLineBreak<'s>, + LineBreak<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmLineBreak { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/mod.rs b/src/wasm/mod.rs index 876d5631..0ff64dc3 100644 --- a/src/wasm/mod.rs +++ b/src/wasm/mod.rs @@ -1,4 +1,5 @@ mod angle_link; +mod ast_node; mod babel_call; mod bold; mod center_block; diff --git a/src/wasm/node_property.rs b/src/wasm/node_property.rs index bbb749ea..56a8dd21 100644 --- a/src/wasm/node_property.rs +++ b/src/wasm/node_property.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::NodeProperty; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmNodeProperty<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmNodeProperty<'s>, + NodeProperty<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmNodeProperty { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/org_macro.rs b/src/wasm/org_macro.rs index bbb749ea..f6312aa0 100644 --- a/src/wasm/org_macro.rs +++ b/src/wasm/org_macro.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::OrgMacro; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmOrgMacro<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmOrgMacro<'s>, + OrgMacro<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmOrgMacro { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/paragraph.rs b/src/wasm/paragraph.rs index bbb749ea..f78c391e 100644 --- a/src/wasm/paragraph.rs +++ b/src/wasm/paragraph.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Paragraph; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmParagraph<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmParagraph<'s>, + Paragraph<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmParagraph { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/plain_link.rs b/src/wasm/plain_link.rs index bbb749ea..52830fab 100644 --- a/src/wasm/plain_link.rs +++ b/src/wasm/plain_link.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::PlainLink; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmPlainLink<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmPlainLink<'s>, + PlainLink<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmPlainLink { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/plain_list.rs b/src/wasm/plain_list.rs index bbb749ea..3d3192e6 100644 --- a/src/wasm/plain_list.rs +++ b/src/wasm/plain_list.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::PlainList; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmPlainList<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmPlainList<'s>, + PlainList<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmPlainList { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/plain_list_item.rs b/src/wasm/plain_list_item.rs index bbb749ea..1f796c25 100644 --- a/src/wasm/plain_list_item.rs +++ b/src/wasm/plain_list_item.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::PlainListItem; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmPlainListItem<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmPlainListItem<'s>, + PlainListItem<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmPlainListItem { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/plain_text.rs b/src/wasm/plain_text.rs index bbb749ea..62b3393e 100644 --- a/src/wasm/plain_text.rs +++ b/src/wasm/plain_text.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::PlainText; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmPlainText<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmPlainText<'s>, + PlainText<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmPlainText { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/planning.rs b/src/wasm/planning.rs index bbb749ea..82652b64 100644 --- a/src/wasm/planning.rs +++ b/src/wasm/planning.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Planning; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmPlanning<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmPlanning<'s>, + Planning<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmPlanning { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/property_drawer.rs b/src/wasm/property_drawer.rs index bbb749ea..7a1eb1c5 100644 --- a/src/wasm/property_drawer.rs +++ b/src/wasm/property_drawer.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::PropertyDrawer; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmPropertyDrawer<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmPropertyDrawer<'s>, + PropertyDrawer<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmPropertyDrawer { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/quote_block.rs b/src/wasm/quote_block.rs index bbb749ea..bde72566 100644 --- a/src/wasm/quote_block.rs +++ b/src/wasm/quote_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::QuoteBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmQuoteBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmQuoteBlock<'s>, + QuoteBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmQuoteBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/radio_link.rs b/src/wasm/radio_link.rs index bbb749ea..b3e61c33 100644 --- a/src/wasm/radio_link.rs +++ b/src/wasm/radio_link.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::RadioLink; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmRadioLink<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmRadioLink<'s>, + RadioLink<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmRadioLink { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/radio_target.rs b/src/wasm/radio_target.rs index bbb749ea..40b1d178 100644 --- a/src/wasm/radio_target.rs +++ b/src/wasm/radio_target.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::RadioTarget; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmRadioTarget<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmRadioTarget<'s>, + RadioTarget<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmRadioTarget { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/regular_link.rs b/src/wasm/regular_link.rs index bbb749ea..4607c7e9 100644 --- a/src/wasm/regular_link.rs +++ b/src/wasm/regular_link.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::RegularLink; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmRegularLink<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmRegularLink<'s>, + RegularLink<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmRegularLink { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/section.rs b/src/wasm/section.rs index bbb749ea..ccc3513f 100644 --- a/src/wasm/section.rs +++ b/src/wasm/section.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Section; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmSection<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmSection<'s>, + Section<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmSection { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/special_block.rs b/src/wasm/special_block.rs index bbb749ea..4aea79da 100644 --- a/src/wasm/special_block.rs +++ b/src/wasm/special_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::SpecialBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmSpecialBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmSpecialBlock<'s>, + SpecialBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmSpecialBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/src_block.rs b/src/wasm/src_block.rs index bbb749ea..7b78042c 100644 --- a/src/wasm/src_block.rs +++ b/src/wasm/src_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::SrcBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmSrcBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmSrcBlock<'s>, + SrcBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmSrcBlock { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/statistics_cookie.rs b/src/wasm/statistics_cookie.rs index bbb749ea..55b563a2 100644 --- a/src/wasm/statistics_cookie.rs +++ b/src/wasm/statistics_cookie.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::StatisticsCookie; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmStatisticsCookie<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmStatisticsCookie<'s>, + StatisticsCookie<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmStatisticsCookie { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/strike_through.rs b/src/wasm/strike_through.rs index bbb749ea..2f8f4c67 100644 --- a/src/wasm/strike_through.rs +++ b/src/wasm/strike_through.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::StrikeThrough; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmStrikeThrough<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmStrikeThrough<'s>, + StrikeThrough<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmStrikeThrough { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/subscript.rs b/src/wasm/subscript.rs index bbb749ea..2c6f12dc 100644 --- a/src/wasm/subscript.rs +++ b/src/wasm/subscript.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Subscript; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmSubscript<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmSubscript<'s>, + Subscript<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmSubscript { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/superscript.rs b/src/wasm/superscript.rs index bbb749ea..18fe4b41 100644 --- a/src/wasm/superscript.rs +++ b/src/wasm/superscript.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Superscript; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmSuperscript<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmSuperscript<'s>, + Superscript<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmSuperscript { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/table.rs b/src/wasm/table.rs index bbb749ea..7a824623 100644 --- a/src/wasm/table.rs +++ b/src/wasm/table.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Table; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmTable<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmTable<'s>, + Table<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmTable { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/table_cell.rs b/src/wasm/table_cell.rs index bbb749ea..ac5f8d36 100644 --- a/src/wasm/table_cell.rs +++ b/src/wasm/table_cell.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::TableCell; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmTableCell<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmTableCell<'s>, + TableCell<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmTableCell { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/table_row.rs b/src/wasm/table_row.rs index bbb749ea..d6d8df36 100644 --- a/src/wasm/table_row.rs +++ b/src/wasm/table_row.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::TableRow; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmTableRow<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmTableRow<'s>, + TableRow<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmTableRow { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/target.rs b/src/wasm/target.rs index bbb749ea..e9700ebf 100644 --- a/src/wasm/target.rs +++ b/src/wasm/target.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Target; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmTarget<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmTarget<'s>, + Target<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmTarget { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/timestamp.rs b/src/wasm/timestamp.rs index bbb749ea..1335a193 100644 --- a/src/wasm/timestamp.rs +++ b/src/wasm/timestamp.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Timestamp; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmTimestamp<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmTimestamp<'s>, + Timestamp<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmTimestamp { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/underline.rs b/src/wasm/underline.rs index bbb749ea..b8dbe3f4 100644 --- a/src/wasm/underline.rs +++ b/src/wasm/underline.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Underline; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmUnderline<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmUnderline<'s>, + Underline<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmUnderline { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/verbatim.rs b/src/wasm/verbatim.rs index bbb749ea..6c78f2ba 100644 --- a/src/wasm/verbatim.rs +++ b/src/wasm/verbatim.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::Verbatim; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmVerbatim<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmVerbatim<'s>, + Verbatim<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmVerbatim { standard_properties, children: Vec::new(), phantom: PhantomData, diff --git a/src/wasm/verse_block.rs b/src/wasm/verse_block.rs index bbb749ea..cee0bdd5 100644 --- a/src/wasm/verse_block.rs +++ b/src/wasm/verse_block.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use organic::types::Document; +use organic::types::VerseBlock; use serde::Deserialize; use serde::Serialize; @@ -12,19 +12,19 @@ use crate::wasm::to_wasm::ToWasmStandardProperties; #[derive(Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] -pub(crate) struct WasmDocument<'s> { +pub(crate) struct WasmVerseBlock<'s> { standard_properties: WasmStandardProperties, children: Vec<()>, phantom: PhantomData<&'s ()>, } to_wasm!( - WasmDocument<'s>, - Document<'s>, + WasmVerseBlock<'s>, + VerseBlock<'s>, wasm_context, standard_properties, { - Ok(WasmDocument { + Ok(WasmVerseBlock { standard_properties, children: Vec::new(), phantom: PhantomData,