Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
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 %};
* 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 %}