pub mod file;
pub mod markdown;
pub mod metadata;
pub mod path;
pub mod template;
pub mod utils;
pub use utils::pipe;
use crate::*;
use dyn_clone::{clone_trait_object, DynClone};
use std::future::Future;
use std::pin::Pin;
pub enum CompileStep {
Completed(Context),
InProgress(Context),
WaitStage(Context),
}
pub type CompileResult = Result<CompileStep, Error>;
pub type CompilerReturn = Pin<Box<dyn Future<Output = CompileResult> + Send>>;
pub trait Compiler: DynClone + Send + Sync {
fn next_step(&mut self, ctx: Context) -> CompilerReturn;
}
clone_trait_object!(Compiler);
#[macro_export]
macro_rules! compile {
($b:expr) => {
(Box::pin(async move { $b }) as _)
};
}