Add a generic WasmAstNode enum.

This commit is contained in:
Tom Alexander
2023-12-25 11:51:39 -05:00
parent 13863a68f7
commit dc012b49f5
60 changed files with 425 additions and 305 deletions

View File

@@ -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,