================== Custom Tag ================== {% mytag %} --- (template (content) (custom_tag_block tag: (identifier)) (content)) ================== Custom Tag With Arguments ================== {% mytag a "b" 3 %} --- (template (content) (custom_tag_block tag: (identifier) (filtered_value (value (variable_attribute (identifier)))) (filtered_value (value (literal (string)))) (filtered_value (value (literal (number))))) (content)) ================== Custom Tag With Keyword Arguments ================== {% mytag a b=1 %} --- (template (content) (custom_tag_block tag: (identifier) (filtered_value (value (variable_attribute (identifier)))) (identifier) (filtered_value (value (literal (number))))) (content)) ================== Custom Tag With As ================== {% mytag a as result %} --- (template (content) (custom_tag_block tag: (identifier) (filtered_value (value (variable_attribute (identifier)))) variable: (identifier)) (content)) ================== Custom Tag With Filtered Argument ================== {% mytag a|upper %} --- (template (content) (custom_tag_block tag: (identifier) (filtered_value (value (variable_attribute (identifier))) (filter_expression (filter)))) (content)) ================== Custom Tag Does Not Nest ================== {% mytag %}hi{% endmytag %} --- (template (content) (custom_tag_block tag: (identifier)) (content) (custom_tag_block tag: (identifier)) (content)) ================== Custom Tag Does Not Cover A Builtin Name :error ================== {% cycle %} --- ================== Custom Filter ================== {{ x|intcomma }} --- (template (content) (template_variable (filtered_value (value (variable_attribute (identifier))) (filter_expression (filter name: (identifier))))) (content)) ================== Custom Filter With Argument ================== {{ x|naturaltime:"y" }} --- (template (content) (template_variable (filtered_value (value (variable_attribute (identifier))) (filter_expression (filter name: (identifier) argument: (value (literal (string))))))) (content)) ================== Custom Filter In A Chain With A Builtin ================== {{ x|intcomma|upper }} --- (template (content) (template_variable (filtered_value (value (variable_attribute (identifier))) (filter_expression (filter name: (identifier)) (filter)))) (content)) ================== Custom Filter In A Tag ================== {% firstof a|intcomma %} --- (template (content) (firstof_block (filtered_value (value (variable_attribute (identifier))) (filter_expression (filter name: (identifier))))) (content)) ================== Builtin Filter Without Its Required Argument :error ================== {{ x|add }} --- ================== Builtin Filter With An Argument It Does Not Take :error ================== {{ x|length:2 }} --- ================== Custom Tag Does Not Cover An End Tag ================== {% endif %} --- (template (content) (unexpected_block) (content)) ================== Custom Tag Does Not Cover A Part Of A Tag Group ================== {% else %} --- (template (content) (unexpected_block) (content)) ================== A Name Reserved For A Tag Is Still A Variable ================== {{ endif }} --- (template (content) (template_variable (filtered_value (value (variable_attribute (identifier))))) (content)) ================== A Name Reserved For A Tag Is Still An Argument ================== {% mytag endif %} --- (template (content) (custom_tag_block tag: (identifier) (filtered_value (value (variable_attribute (identifier))))) (content)) ================== Custom Tag With A Keyword Argument Twice :error ================== {% mytag a=1 a=2 %} --- ================== Custom Tag With Keyword Arguments And As ================== {% mytag a=1 b=2 as out %} --- (template (content) (custom_tag_block tag: (identifier) (identifier) (filtered_value (value (literal (number)))) (identifier) (filtered_value (value (literal (number)))) variable: (identifier)) (content)) ================== Custom Tag Repeating A Keyword Of The Tag Before It ================== {% mytag page=1 %}{% mytag page=2 %} --- (template (content) (custom_tag_block tag: (identifier) (identifier) (filtered_value (value (literal (number))))) (custom_tag_block tag: (identifier) (identifier) (filtered_value (value (literal (number))))) (content))