Jinja 2 templates: stylize block comments like C block comments
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Aug 2020 17:37:00 +0000 (13:37 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Aug 2020 17:37:00 +0000 (13:37 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/templates/metadata-struct-ft.j2
barectf/templates/metadata.j2

index dcfb05dffb321ebd56a5ad85d0955b8e3b972134..7c300357178290c010992a847cbf56a18d0e97c0 100644 (file)
@@ -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 %};
index f4d5612f856e6e56adff51ebca90798c6e1e898a..ad46b626a88839e7964ce2f6bcb63f203a9bfec2 100644 (file)
  * For more details, see <https://barectf.org/>.
  */
 {#
-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 %}
This page took 0.023651 seconds and 4 git commands to generate.