hence/henceforth/src/compiler/templates.rs

16 lines
436 B
Rust

use askama::Template;
pub struct IdLike<T, U> {
pub id: T,
pub data: U,
}
#[derive(Template)]
#[template(path = "default.asm", escape = "none")]
pub struct DefaultTemplate {
pub strings: Vec<IdLike<usize, String>>,
pub conditions: Vec<IdLike<usize, (hence::parser::ast::Body, hence::parser::ast::Body)>>,
pub words: Vec<IdLike<usize, (String, hence::parser::ast::Body)>>,
pub main: hence::parser::ast::Body,
}