rshtml_core 0.2.0

RsHtml: A Template Engine for Seamless HTML and Rust Integration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Node;
use crate::compiler::Compiler;
use anyhow::Result;
use proc_macro2::TokenStream;
use quote::quote;
use std::path::Path;

pub struct ExtendsDirectiveCompiler;

impl ExtendsDirectiveCompiler {
    pub fn compile(compiler: &mut Compiler, path: &Path, layout: &Node) -> Result<TokenStream> {
        compiler.layout_directive = path.to_path_buf();
        compiler.layout = Some(layout.clone());

        Ok(quote! {})
    }
}