diff --git a/Cargo.toml b/Cargo.toml index 610fa49..3890fd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,7 @@ opentelemetry-otlp = { version = "0.13.0", optional = true } opentelemetry-semantic-conventions = { version = "0.12.0", optional = true } serde = { version = "1.0.193", optional = true, features = ["derive"] } serde-wasm-bindgen = { version = "0.6.3", optional = true } +serde_json = { version = "1.0.108", optional = true } tokio = { version = "1.30.0", optional = true, default-features = false, features = ["rt", "rt-multi-thread"] } tracing = { version = "0.1.37", optional = true } tracing-opentelemetry = { version = "0.20.0", optional = true } @@ -68,7 +69,7 @@ compare = ["tokio/process", "tokio/macros"] foreign_document_test = ["compare", "dep:futures", "tokio/sync", "dep:walkdir", "tokio/process"] tracing = ["dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions", "dep:tokio", "dep:tracing", "dep:tracing-opentelemetry", "dep:tracing-subscriber"] event_count = [] -wasm = ["dep:serde", "dep:wasm-bindgen", "dep:serde-wasm-bindgen"] +wasm = ["dep:serde", "dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:serde_json"] # Optimized build for any sort of release. [profile.release-lto] diff --git a/Makefile b/Makefile index a5e2f80..d99f759 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,10 @@ wasm: > cargo build --target=wasm32-unknown-unknown --profile wasm --bin wasm --features wasm > wasm-bindgen --target web --out-dir target/wasm32-unknown-unknown/js target/wasm32-unknown-unknown/wasm/wasm.wasm +.PHONY: run_wasm +run_wasm: +> cargo run --profile wasm --bin wasm --features wasm | jq + .PHONY: clean clean: > cargo clean diff --git a/src/bin_wasm.rs b/src/bin_wasm.rs index 4a2212c..5f1b0bb 100644 --- a/src/bin_wasm.rs +++ b/src/bin_wasm.rs @@ -1,4 +1,4 @@ -#![no_main] +// #![no_main] use organic::parser::parse_with_settings; use organic::settings::GlobalSettings; @@ -12,6 +12,11 @@ mod wasm; #[wasm_bindgen] pub fn parse_org(org_contents: &str) -> wasm_bindgen::JsValue { + let rust_parsed = impl_parse_org(org_contents); + serde_wasm_bindgen::to_value(&rust_parsed).unwrap() +} + +fn impl_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) @@ -23,5 +28,13 @@ pub fn parse_org(org_contents: &str) -> wasm_bindgen::JsValue { Ok(wasm_document) => wasm_document, Err(err) => ParseResult::Error(format!("{:?}", err)), }; - serde_wasm_bindgen::to_value(&rust_parsed).unwrap() + rust_parsed +} + +fn main() -> Result<(), Box> { + let body = include_str!("/tmp/test.org"); + let result = impl_parse_org(body); + + println!("{}", serde_json::to_string(&result)?); + Ok(()) } diff --git a/src/wasm/angle_link.rs b/src/wasm/angle_link.rs index dfa7868..7e9d15c 100644 --- a/src/wasm/angle_link.rs +++ b/src/wasm/angle_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmAngleLink<'s> { diff --git a/src/wasm/babel_call.rs b/src/wasm/babel_call.rs index bd71b65..fe1a3e7 100644 --- a/src/wasm/babel_call.rs +++ b/src/wasm/babel_call.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmBabelCall<'s> { diff --git a/src/wasm/bold.rs b/src/wasm/bold.rs index e399b11..17211bc 100644 --- a/src/wasm/bold.rs +++ b/src/wasm/bold.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmBold<'s> { diff --git a/src/wasm/center_block.rs b/src/wasm/center_block.rs index 29a63f2..aaca3a6 100644 --- a/src/wasm/center_block.rs +++ b/src/wasm/center_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCenterBlock<'s> { diff --git a/src/wasm/citation.rs b/src/wasm/citation.rs index ca7e2ec..0ab3f6f 100644 --- a/src/wasm/citation.rs +++ b/src/wasm/citation.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCitation<'s> { diff --git a/src/wasm/citation_reference.rs b/src/wasm/citation_reference.rs index bd7752b..4463bb3 100644 --- a/src/wasm/citation_reference.rs +++ b/src/wasm/citation_reference.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCitationReference<'s> { diff --git a/src/wasm/clock.rs b/src/wasm/clock.rs index faa3704..1b4e9de 100644 --- a/src/wasm/clock.rs +++ b/src/wasm/clock.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmClock<'s> { diff --git a/src/wasm/code.rs b/src/wasm/code.rs index f4b119f..aaea909 100644 --- a/src/wasm/code.rs +++ b/src/wasm/code.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCode<'s> { diff --git a/src/wasm/comment.rs b/src/wasm/comment.rs index 0a40eb8..22489a9 100644 --- a/src/wasm/comment.rs +++ b/src/wasm/comment.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmComment<'s> { diff --git a/src/wasm/comment_block.rs b/src/wasm/comment_block.rs index 224788a..ca56925 100644 --- a/src/wasm/comment_block.rs +++ b/src/wasm/comment_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmCommentBlock<'s> { diff --git a/src/wasm/diary_sexp.rs b/src/wasm/diary_sexp.rs index bae555e..14735ee 100644 --- a/src/wasm/diary_sexp.rs +++ b/src/wasm/diary_sexp.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDiarySexp<'s> { diff --git a/src/wasm/document.rs b/src/wasm/document.rs index c1f9ddb..fc6ef7b 100644 --- a/src/wasm/document.rs +++ b/src/wasm/document.rs @@ -10,11 +10,12 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDocument<'s> { standard_properties: WasmStandardProperties, + additional_properties: Vec<(String, String)>, children: Vec<()>, phantom: PhantomData<&'s ()>, } @@ -27,6 +28,7 @@ to_wasm!( { Ok(WasmDocument { standard_properties, + additional_properties: Vec::new(), children: Vec::new(), phantom: PhantomData, }) diff --git a/src/wasm/drawer.rs b/src/wasm/drawer.rs index f8f41e9..5f875b5 100644 --- a/src/wasm/drawer.rs +++ b/src/wasm/drawer.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDrawer<'s> { diff --git a/src/wasm/dynamic_block.rs b/src/wasm/dynamic_block.rs index 492d3d7..7c343de 100644 --- a/src/wasm/dynamic_block.rs +++ b/src/wasm/dynamic_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmDynamicBlock<'s> { diff --git a/src/wasm/entity.rs b/src/wasm/entity.rs index 9e7f00e..be6dcfc 100644 --- a/src/wasm/entity.rs +++ b/src/wasm/entity.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmEntity<'s> { diff --git a/src/wasm/example_block.rs b/src/wasm/example_block.rs index 4f59139..0f8d4e6 100644 --- a/src/wasm/example_block.rs +++ b/src/wasm/example_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmExampleBlock<'s> { diff --git a/src/wasm/export_block.rs b/src/wasm/export_block.rs index c408f67..e564b6a 100644 --- a/src/wasm/export_block.rs +++ b/src/wasm/export_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmExportBlock<'s> { diff --git a/src/wasm/export_snippet.rs b/src/wasm/export_snippet.rs index 3c78899..f9d8adb 100644 --- a/src/wasm/export_snippet.rs +++ b/src/wasm/export_snippet.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmExportSnippet<'s> { diff --git a/src/wasm/fixed_width_area.rs b/src/wasm/fixed_width_area.rs index a8bd14e..6555c93 100644 --- a/src/wasm/fixed_width_area.rs +++ b/src/wasm/fixed_width_area.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmFixedWidthArea<'s> { diff --git a/src/wasm/footnote_definition.rs b/src/wasm/footnote_definition.rs index a246cd0..342411a 100644 --- a/src/wasm/footnote_definition.rs +++ b/src/wasm/footnote_definition.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmFootnoteDefinition<'s> { diff --git a/src/wasm/footnote_reference.rs b/src/wasm/footnote_reference.rs index 5f83e1c..029cd92 100644 --- a/src/wasm/footnote_reference.rs +++ b/src/wasm/footnote_reference.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmFootnoteReference<'s> { diff --git a/src/wasm/headline.rs b/src/wasm/headline.rs index 9fc6919..37db9cd 100644 --- a/src/wasm/headline.rs +++ b/src/wasm/headline.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmHeadline<'s> { diff --git a/src/wasm/horizontal_rule.rs b/src/wasm/horizontal_rule.rs index 8ccba7d..126ebfd 100644 --- a/src/wasm/horizontal_rule.rs +++ b/src/wasm/horizontal_rule.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmHorizontalRule<'s> { diff --git a/src/wasm/inline_babel_call.rs b/src/wasm/inline_babel_call.rs index 69afb15..bcc99fe 100644 --- a/src/wasm/inline_babel_call.rs +++ b/src/wasm/inline_babel_call.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmInlineBabelCall<'s> { diff --git a/src/wasm/inline_source_block.rs b/src/wasm/inline_source_block.rs index cecd493..b9e6774 100644 --- a/src/wasm/inline_source_block.rs +++ b/src/wasm/inline_source_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmInlineSourceBlock<'s> { diff --git a/src/wasm/italic.rs b/src/wasm/italic.rs index 4d845a8..9931272 100644 --- a/src/wasm/italic.rs +++ b/src/wasm/italic.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmItalic<'s> { diff --git a/src/wasm/keyword.rs b/src/wasm/keyword.rs index 2dd9ad4..f5ed481 100644 --- a/src/wasm/keyword.rs +++ b/src/wasm/keyword.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmKeyword<'s> { diff --git a/src/wasm/latex_environment.rs b/src/wasm/latex_environment.rs index 5fda46d..0ad0928 100644 --- a/src/wasm/latex_environment.rs +++ b/src/wasm/latex_environment.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmLatexEnvironment<'s> { diff --git a/src/wasm/latex_fragment.rs b/src/wasm/latex_fragment.rs index 952f930..0eff326 100644 --- a/src/wasm/latex_fragment.rs +++ b/src/wasm/latex_fragment.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmLatexFragment<'s> { diff --git a/src/wasm/line_break.rs b/src/wasm/line_break.rs index 8179e5f..919aa2a 100644 --- a/src/wasm/line_break.rs +++ b/src/wasm/line_break.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmLineBreak<'s> { diff --git a/src/wasm/node_property.rs b/src/wasm/node_property.rs index 56a8dd2..c05d7ac 100644 --- a/src/wasm/node_property.rs +++ b/src/wasm/node_property.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmNodeProperty<'s> { diff --git a/src/wasm/org_macro.rs b/src/wasm/org_macro.rs index f6312aa..c7aea52 100644 --- a/src/wasm/org_macro.rs +++ b/src/wasm/org_macro.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmOrgMacro<'s> { diff --git a/src/wasm/paragraph.rs b/src/wasm/paragraph.rs index f78c391..1d196ee 100644 --- a/src/wasm/paragraph.rs +++ b/src/wasm/paragraph.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmParagraph<'s> { diff --git a/src/wasm/parse_result.rs b/src/wasm/parse_result.rs index d1a24d9..a1ccffc 100644 --- a/src/wasm/parse_result.rs +++ b/src/wasm/parse_result.rs @@ -3,7 +3,7 @@ use serde::Serialize; use super::document::WasmDocument; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "status", content = "content")] pub(crate) enum ParseResult<'s> { #[serde(rename = "success")] diff --git a/src/wasm/plain_link.rs b/src/wasm/plain_link.rs index 52830fa..a3885eb 100644 --- a/src/wasm/plain_link.rs +++ b/src/wasm/plain_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainLink<'s> { diff --git a/src/wasm/plain_list.rs b/src/wasm/plain_list.rs index 3d3192e..c7da1b4 100644 --- a/src/wasm/plain_list.rs +++ b/src/wasm/plain_list.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainList<'s> { diff --git a/src/wasm/plain_list_item.rs b/src/wasm/plain_list_item.rs index 1f796c2..0d1f623 100644 --- a/src/wasm/plain_list_item.rs +++ b/src/wasm/plain_list_item.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainListItem<'s> { diff --git a/src/wasm/plain_text.rs b/src/wasm/plain_text.rs index 62b3393..8e610e0 100644 --- a/src/wasm/plain_text.rs +++ b/src/wasm/plain_text.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlainText<'s> { diff --git a/src/wasm/planning.rs b/src/wasm/planning.rs index 82652b6..2e3b6b6 100644 --- a/src/wasm/planning.rs +++ b/src/wasm/planning.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPlanning<'s> { diff --git a/src/wasm/property_drawer.rs b/src/wasm/property_drawer.rs index 7a1eb1c..36ce6cc 100644 --- a/src/wasm/property_drawer.rs +++ b/src/wasm/property_drawer.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmPropertyDrawer<'s> { diff --git a/src/wasm/quote_block.rs b/src/wasm/quote_block.rs index bde7256..ad1ce75 100644 --- a/src/wasm/quote_block.rs +++ b/src/wasm/quote_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmQuoteBlock<'s> { diff --git a/src/wasm/radio_link.rs b/src/wasm/radio_link.rs index b3e61c3..753c349 100644 --- a/src/wasm/radio_link.rs +++ b/src/wasm/radio_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmRadioLink<'s> { diff --git a/src/wasm/radio_target.rs b/src/wasm/radio_target.rs index 40b1d17..cfac257 100644 --- a/src/wasm/radio_target.rs +++ b/src/wasm/radio_target.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmRadioTarget<'s> { diff --git a/src/wasm/regular_link.rs b/src/wasm/regular_link.rs index 4607c7e..2846b3a 100644 --- a/src/wasm/regular_link.rs +++ b/src/wasm/regular_link.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmRegularLink<'s> { diff --git a/src/wasm/section.rs b/src/wasm/section.rs index ccc3513..0256523 100644 --- a/src/wasm/section.rs +++ b/src/wasm/section.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSection<'s> { diff --git a/src/wasm/special_block.rs b/src/wasm/special_block.rs index 4aea79d..e40800f 100644 --- a/src/wasm/special_block.rs +++ b/src/wasm/special_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSpecialBlock<'s> { diff --git a/src/wasm/src_block.rs b/src/wasm/src_block.rs index 7b78042..276a878 100644 --- a/src/wasm/src_block.rs +++ b/src/wasm/src_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSrcBlock<'s> { diff --git a/src/wasm/standard_properties.rs b/src/wasm/standard_properties.rs index 92db1e7..2e8fcb4 100644 --- a/src/wasm/standard_properties.rs +++ b/src/wasm/standard_properties.rs @@ -6,7 +6,7 @@ use serde::Serialize; use super::to_wasm::ToWasmContext; use super::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] pub(crate) struct WasmStandardProperties { begin: usize, end: usize, diff --git a/src/wasm/statistics_cookie.rs b/src/wasm/statistics_cookie.rs index 55b563a..bd258d0 100644 --- a/src/wasm/statistics_cookie.rs +++ b/src/wasm/statistics_cookie.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmStatisticsCookie<'s> { diff --git a/src/wasm/strike_through.rs b/src/wasm/strike_through.rs index 2f8f4c6..bc26892 100644 --- a/src/wasm/strike_through.rs +++ b/src/wasm/strike_through.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmStrikeThrough<'s> { diff --git a/src/wasm/subscript.rs b/src/wasm/subscript.rs index 2c6f12d..08b20c8 100644 --- a/src/wasm/subscript.rs +++ b/src/wasm/subscript.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSubscript<'s> { diff --git a/src/wasm/superscript.rs b/src/wasm/superscript.rs index 18fe4b4..d33bd5a 100644 --- a/src/wasm/superscript.rs +++ b/src/wasm/superscript.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmSuperscript<'s> { diff --git a/src/wasm/table.rs b/src/wasm/table.rs index 7a82462..f37331a 100644 --- a/src/wasm/table.rs +++ b/src/wasm/table.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTable<'s> { diff --git a/src/wasm/table_cell.rs b/src/wasm/table_cell.rs index ac5f8d3..753fa3c 100644 --- a/src/wasm/table_cell.rs +++ b/src/wasm/table_cell.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTableCell<'s> { diff --git a/src/wasm/table_row.rs b/src/wasm/table_row.rs index d6d8df3..8a638b3 100644 --- a/src/wasm/table_row.rs +++ b/src/wasm/table_row.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTableRow<'s> { diff --git a/src/wasm/target.rs b/src/wasm/target.rs index e9700eb..4cb564f 100644 --- a/src/wasm/target.rs +++ b/src/wasm/target.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTarget<'s> { diff --git a/src/wasm/timestamp.rs b/src/wasm/timestamp.rs index 1335a19..779b96f 100644 --- a/src/wasm/timestamp.rs +++ b/src/wasm/timestamp.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmTimestamp<'s> { diff --git a/src/wasm/underline.rs b/src/wasm/underline.rs index b8dbe3f..1cc8cd4 100644 --- a/src/wasm/underline.rs +++ b/src/wasm/underline.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmUnderline<'s> { diff --git a/src/wasm/verbatim.rs b/src/wasm/verbatim.rs index 6c78f2b..566f6ec 100644 --- a/src/wasm/verbatim.rs +++ b/src/wasm/verbatim.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmVerbatim<'s> { diff --git a/src/wasm/verse_block.rs b/src/wasm/verse_block.rs index cee0bdd..28d81d8 100644 --- a/src/wasm/verse_block.rs +++ b/src/wasm/verse_block.rs @@ -9,7 +9,7 @@ use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::wasm::to_wasm::ToWasmStandardProperties; -#[derive(Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub(crate) struct WasmVerseBlock<'s> {