aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-29 21:49:42 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-29 21:49:44 +0100
commit84a1960489c9c92ef898eb7617061035df39ac42 (patch)
tree599bee592dbffdb5e1365e4aa9bf4f77f16d4611
parentcb660c7b8d398800d91d7c4c6c3276959fd14e71 (diff)
downloadaskama-84a1960489c9c92ef898eb7617061035df39ac42.tar.gz
askama-84a1960489c9c92ef898eb7617061035df39ac42.tar.bz2
askama-84a1960489c9c92ef898eb7617061035df39ac42.zip
Move input module into askama_shared
-rw-r--r--askama_derive/src/generator.rs2
-rw-r--r--askama_derive/src/lib.rs3
-rw-r--r--askama_shared/Cargo.toml2
-rw-r--r--askama_shared/src/input.rs (renamed from askama_derive/src/input.rs)2
-rw-r--r--askama_shared/src/lib.rs1
5 files changed, 6 insertions, 4 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 4f5b495..a12b1f0 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1,6 +1,6 @@
use super::{get_template_source, Context, Heritage};
-use crate::input::{Source, TemplateInput};
use askama_shared::filters;
+use askama_shared::input::{Source, TemplateInput};
use askama_shared::parser::{
parse, Cond, Expr, MatchParameter, MatchParameters, MatchVariant, Node, Target, When, WS,
};
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 2189458..0b64057 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -3,9 +3,8 @@ extern crate proc_macro;
extern crate quote;
mod generator;
-mod input;
-use crate::input::{Print, Source, TemplateInput};
+use askama_shared::input::{Print, Source, TemplateInput};
use askama_shared::parser::{parse, Expr, Macro, Node};
use askama_shared::{read_config_file, Config};
use proc_macro::TokenStream;
diff --git a/askama_shared/Cargo.toml b/askama_shared/Cargo.toml
index 19d3274..f82f026 100644
--- a/askama_shared/Cargo.toml
+++ b/askama_shared/Cargo.toml
@@ -22,10 +22,12 @@ humansize = { version = "1.1.0", optional = true }
# https://github.com/rust-lang/rust/issues/62146
nom = { version = "5", default-features = false, features = ["std"] }
num-traits = { version = "0.2.6", optional = true }
+quote = "1"
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_derive = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
serde_yaml = { version = "0.8", optional = true }
+syn = "1"
toml = { version = "0.5", optional = true }
[package.metadata.docs.rs]
diff --git a/askama_derive/src/input.rs b/askama_shared/src/input.rs
index 6a54a99..53718f0 100644
--- a/askama_derive/src/input.rs
+++ b/askama_shared/src/input.rs
@@ -1,4 +1,4 @@
-use askama_shared::{Config, Syntax};
+use crate::{Config, Syntax};
use std::path::PathBuf;
diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs
index b2f1271..fa4a9a0 100644
--- a/askama_shared/src/lib.rs
+++ b/askama_shared/src/lib.rs
@@ -16,6 +16,7 @@ mod error;
pub use crate::error::{Error, Result};
pub mod filters;
pub mod helpers;
+pub mod input;
pub mod parser;
#[derive(Debug)]