diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-06-28 09:28:56 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-06-28 15:39:19 +0200 |
commit | ae02be87c69c17df1ba2b4c862c561e2e75a5bef (patch) | |
tree | b487d6d2151a87478426441c99b85b858fb1a0bc /askama_derive/src/parser | |
parent | f3d619bacf1dee3083c92e4910b3925c7fd23dea (diff) | |
download | askama-ae02be87c69c17df1ba2b4c862c561e2e75a5bef.tar.gz askama-ae02be87c69c17df1ba2b4c862c561e2e75a5bef.tar.bz2 askama-ae02be87c69c17df1ba2b4c862c561e2e75a5bef.zip |
Parse templates once
Diffstat (limited to 'askama_derive/src/parser')
-rw-r--r-- | askama_derive/src/parser/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/askama_derive/src/parser/mod.rs b/askama_derive/src/parser/mod.rs index 79b178e..ccc9ff9 100644 --- a/askama_derive/src/parser/mod.rs +++ b/askama_derive/src/parser/mod.rs @@ -58,10 +58,7 @@ impl From<char> for Whitespace { } } -pub(crate) fn parse<'a>( - src: &'a str, - syntax: &'a Syntax<'_>, -) -> Result<Vec<Node<'a>>, CompileError> { +pub(crate) fn parse<'a>(src: &'a str, syntax: &Syntax<'_>) -> Result<Vec<Node<'a>>, CompileError> { match Node::parse(src, &State::new(syntax)) { Ok((left, res)) => { if !left.is_empty() { |