aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 2a233d5..33fbe4c 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 input::TemplateInput;
-use parser::{self, Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS};
+use parser::{Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS};
use shared::filters;
use proc_macro2::Span;
@@ -13,6 +13,8 @@ use std::{cmp, hash, str};
use syn;
+use parser::parse;
+
pub(crate) fn generate(
input: &TemplateInput,
contexts: &HashMap<&PathBuf, Context>,
@@ -482,7 +484,7 @@ impl<'a> Generator<'a> {
.config
.find_template(path, Some(&self.input.path));
let src = get_template_source(&path);
- let nodes = parser::parse(&src);
+ let nodes = parse(&src, self.input.syntax);
{
// Since nodes must not outlive the Generator, we instantiate
// a nested Generator here to handle the include's nodes.