From 84d81e101bc706cfe85320df39c1f32828225153 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 18 Mar 2019 10:13:45 +0100 Subject: Allow Rust macro calls in more places (see #226) --- askama_derive/src/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'askama_derive/src/parser.rs') diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs index c4cb52d..2a342fc 100644 --- a/askama_derive/src/parser.rs +++ b/askama_derive/src/parser.rs @@ -454,6 +454,7 @@ named!(expr_single, alt!( expr_num_lit | expr_str_lit | expr_path | + expr_rust_macro | expr_array_lit | expr_var | expr_group @@ -554,7 +555,7 @@ named!(expr_unary, do_parse!( }) )); -named!(rust_macro, do_parse!( +named!(expr_rust_macro, do_parse!( mname: identifier >> tag!("!") >> args: macro_arguments >> @@ -595,7 +596,6 @@ named!(range_right, do_parse!( named!(expr_any, alt!( range_right | - rust_macro | do_parse!( left: expr_or >> rest: range_right >> (match rest { -- cgit