diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-03-18 10:13:45 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-03-18 10:13:45 +0100 |
commit | 84d81e101bc706cfe85320df39c1f32828225153 (patch) | |
tree | f4bd2c48cad98efe86ffc152b46b177efddd4f5e /askama_derive/src/parser.rs | |
parent | 9a4106e77edfc67edc802814ee59759f51a96bdf (diff) | |
download | askama-84d81e101bc706cfe85320df39c1f32828225153.tar.gz askama-84d81e101bc706cfe85320df39c1f32828225153.tar.bz2 askama-84d81e101bc706cfe85320df39c1f32828225153.zip |
Allow Rust macro calls in more places (see #226)
Diffstat (limited to 'askama_derive/src/parser.rs')
-rw-r--r-- | askama_derive/src/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Input, Expr>, 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<Input, Expr>, do_parse!( }) )); -named!(rust_macro<Input, Expr>, do_parse!( +named!(expr_rust_macro<Input, Expr>, do_parse!( mname: identifier >> tag!("!") >> args: macro_arguments >> @@ -595,7 +596,6 @@ named!(range_right<Input, Expr>, do_parse!( named!(expr_any<Input, Expr>, alt!( range_right | - rust_macro | do_parse!( left: expr_or >> rest: range_right >> (match rest { |