From: Kevin Date: Tue, 12 May 2020 01:08:06 +0000 (-0400) Subject: Allow variable identifiers to be conditionals X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64d169038b88f4ed2cff176873d4b3c26cdaa765;p=thirdparty%2Fjinja.git Allow variable identifiers to be conditionals This aligns with the Python behaviour and pre-existing Jinja behaviour where a variable expression can be used as a test for a conditional. This was necessary to allow variable identifiers to be used in places which was expecting a possible conditional expression, like in a if/else expression. --- diff --git a/grammar.ebnf b/grammar.ebnf index beaf0d38..f51d34ce 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -222,6 +222,7 @@ conditional_expression | conditional_expression_logical | conditional_expression_comparator | conditional_expression_test + | variable_identifier ; conditional_expression_if