From 9f3b590206e3dfe33b7129b1c8ff010f60318cf2 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 27 Aug 2017 22:10:42 +0200 Subject: Move most of the code into new askama_shared crate This makes it possible to share code between askama and askama_derive. --- askama_shared/src/lib.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 askama_shared/src/lib.rs (limited to 'askama_shared/src/lib.rs') diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs new file mode 100644 index 0000000..1ee19cf --- /dev/null +++ b/askama_shared/src/lib.rs @@ -0,0 +1,29 @@ +#[macro_use] +extern crate error_chain; +#[macro_use] +extern crate nom; +extern crate quote; +extern crate syn; + +#[cfg(feature = "serde-json")] +extern crate serde; +#[cfg(feature = "serde-json")] +extern crate serde_json; + +pub use errors::Result; +pub mod filters; +pub mod path; +pub use parser::parse; +pub use generator::generate; + +mod generator; +mod parser; + +mod errors { + error_chain! { + foreign_links { + Fmt(::std::fmt::Error); + Json(::serde_json::Error) #[cfg(feature = "serde-json")]; + } + } +} -- cgit