diff options
author | Kevin <kevin@kevin-brown.com> | 2020-05-13 23:04:32 -0400 |
---|---|---|
committer | Kevin <kevin@kevin-brown.com> | 2020-05-13 23:04:32 -0400 |
commit | 1a776bf469ab7b6b9c88cbb848465500be742fd8 (patch) | |
tree | 2a7e2516c6b4f1f724fe99c275a90695bcd0ca8d | |
parent | 7ea592b69a9d020594a44fe9150b7a9cb267ffdc (diff) | |
download | jinja2-1a776bf469ab7b6b9c88cbb848465500be742fd8.tar.gz |
Support filters being call chained
Previously filters were not treated the same as variable, as a
result it was not possible to call the result of a filter. Since
filters are treated as regular variable and therefore can be called
any number of times, this change was necessary to allow them to be
parsed the same way.
-rw-r--r-- | grammar.ebnf | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/grammar.ebnf b/grammar.ebnf index 1939e5e..34b8897 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -334,13 +334,8 @@ variable_filter "|" {SP}* @:filter
;
filter =
- name:IDENTIFIER
- [arguments:filter_parameters]
- ;
-
-filter_parameters
- =
- "(" @:variable_accessor_call_parameters ")"
+ variable:IDENTIFIER
+ accessors:{ variable_accessor_call }*
;
comment_expression
|