From: Philippe Proulx Date: Thu, 27 Aug 2020 17:37:00 +0000 (-0400) Subject: Jinja 2 templates: stylize block comments like C block comments X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=8f0d81a04e031b4a8a43791e771381a1e584bb70;hp=7db1a1f59a584fd75da11b70a3b9ff485b89807f;p=deliverable%2Fbarectf.git Jinja 2 templates: stylize block comments like C block comments Signed-off-by: Philippe Proulx --- diff --git a/barectf/templates/metadata-struct-ft.j2 b/barectf/templates/metadata-struct-ft.j2 index dcfb05d..7c30035 100644 --- a/barectf/templates/metadata-struct-ft.j2 +++ b/barectf/templates/metadata-struct-ft.j2 @@ -1,9 +1,9 @@ struct { {% for name, member in ft.members.items() %} {# -`chain` is a list of static array field types terminated with a -non-array field type (the most nested). -#} + # `chain` is a list of static array field types terminated with a + # non-array field type (the most nested). + #} {% set chain = ft_chain(member.field_type) %} {{ chain[-1] | ft_str | indent_tab }} {{ name }} {%- for array_ft in chain[:-1] %}[{{ array_ft.length }}]{% endfor %}; diff --git a/barectf/templates/metadata.j2 b/barectf/templates/metadata.j2 index f4d5612..ad46b62 100644 --- a/barectf/templates/metadata.j2 +++ b/barectf/templates/metadata.j2 @@ -31,9 +31,10 @@ * For more details, see . */ {# -Generates a root field type string named `name` for the field type `rft` -with all the lines except the first one indented with a single tab. -#} + # Generates a root field type string named `name` for the field type + # `rft` with all the lines except the first one indented with a single + # tab. + #} {% macro root_ft(name, rft) -%} {{ name }} := {{ rft | ft_str | indent_tab }}; {%- endmacro %}