From: Kevin Brown Date: Fri, 8 May 2020 12:14:38 +0000 (-0400) Subject: Switch blocks and variables to dictionaries X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8dafa2e188cc470dced09385693c0d64e86db2c;p=thirdparty%2Fjinja.git Switch blocks and variables to dictionaries This should make it easier to differentiate them based on their type but also allow for the different pieces to have proper names. --- diff --git a/tatsu_grammar.txt b/tatsu_grammar.txt index f214a9c5..9adc5299 100644 --- a/tatsu_grammar.txt +++ b/tatsu_grammar.txt @@ -39,12 +39,12 @@ block_expression block_start = - block_open !("end") IDENTIFIER {block_parameter}* block_close + block_open type:`blockstart` !("end") name:IDENTIFIER parameters:[{block_parameter}*] block_close ; block_end = - block_open "end" IDENTIFIER block_close + block_open type:`blockend` "end" name:IDENTIFIER block_close ; block_open @@ -63,7 +63,7 @@ block_parameter variable_expression = - variable_open variable_identifier { !variable_close variable_filter }* variable_close + variable_open type:`variable` name:variable_identifier { !variable_close filters+:variable_filter }* variable_close ; variable_open =