]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Simplify variable values in grammars
authorKevin <kevin@kevin-brown.com>
Tue, 12 May 2020 01:11:32 +0000 (21:11 -0400)
committerKevin <kevin@kevin-brown.com>
Tue, 12 May 2020 01:11:32 +0000 (21:11 -0400)
Now that variable identifers are able to be used as conditional
expressions, we can just specify that variable expressions in the
grammar are looking for a conditional expression as the name of the
variable.

grammar.ebnf

index f51d34ce70561eff64f90380e3e7be577d4e5f65..8d37f80983f4242d47d47d2a257f5b830ed23b51 100644 (file)
@@ -134,7 +134,7 @@ block_parameter_value_only
 \r
 variable_expression\r
     =\r
-    variable_open type:`variable` name:( conditional_expression | variable_identifier ) variable_close\r
+    variable_open type:`variable` name:conditional_expression variable_close\r
     ;\r
 variable_open\r
     =\r