| {#--- Constants #} |
| {%- for constant in module.constants %} |
| const {{constant.name}} = {{constant.value|expression_to_text}}; |
| {%- endfor %} |
| |
| {#--- Enums #} |
| {%- from "enum_definition.tmpl" import enum_def %} |
| {%- for enum in enums %} |
| {{ enum_def("", enum) }} |
| {%- endfor %} |
| |
| {#--- Struct definitions #} |
| {%- from "struct_definition.tmpl" import struct_def %} |
| {% for struct in structs %} |
| {{ struct_def(struct) }} |
| {%- endfor -%} |
| |
| {#--- Union definitions #} |
| {%- from "union_definition.tmpl" import union_def %} |
| {% for union in unions %} |
| {{ union_def(union) }} |
| {%- endfor -%} |
| |
| {#--- Interface definitions #} |
| {%- for interface in interfaces -%} |
| {%- include "interface_definition.tmpl" %} |
| {%- endfor %} |