From 5d193ce822fab739f889a70c1defa402ddea8eab Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sat, 7 Jan 2017 20:33:29 +0100 Subject: Move parser and generator code into askama crate --- askama_derive/src/lib.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'askama_derive/src/lib.rs') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index 3b8fe55..8613ead 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -1,13 +1,9 @@ #![feature(proc_macro, proc_macro_lib)] -#[macro_use] -extern crate nom; +extern crate askama; extern crate proc_macro; extern crate syn; -mod generator; -mod parser; - use proc_macro::TokenStream; use std::fs::File; use std::io::Read; @@ -65,6 +61,6 @@ pub fn derive_template(input: TokenStream) -> TokenStream { let name = &ast.ident; let path = get_path_from_attrs(&ast.attrs); let src = get_template_source(&path); - let tokens = parser::parse(&src); - generator::generate(name.as_ref(), &tokens).parse().unwrap() + let tokens = askama::parser::parse(&src); + askama::generator::generate(name.as_ref(), &tokens).parse().unwrap() } -- cgit