This file can contain common variables and macros.
It is to be imported by other templates, for example by `bitfield.h.j2`
in this patch.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
-{% set prefix = cfg.options.code_generation_options.identifier_prefix %}
-{% set ucprefix = prefix | upper %}
+{% import 'common.j2' as common %}
+{% set prefix = common.prefix %}
+{% set ucprefix = common.ucprefix %}
#ifndef _{{ ucprefix }}BITFIELD_H
#define _{{ ucprefix }}BITFIELD_H
--- /dev/null
+{#
+ # Common variables and macros.
+ #}
+
+{# identifier prefix and its uppercase equivalent #}
+{% set prefix = cfg.options.code_generation_options.identifier_prefix %}
+{% set ucprefix = prefix | upper %}