Add a generic WasmAstNode enum.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user