{%- macro enum_table(enum) -%}
<table border="1">
    <tr>
        <th colspan="3">enum {{enum.__name__}}</th>
    </tr>
    {%- for member in enum %}
    <tr>
        <td>{{member.name}}</td>
        <td>{{"0x%x" % member.value}}</td>
        <td>
            {%- if member.rdl_name %}
                <em>{{member.rdl_name}}</em>
            {% endif %}
            {{- get_enum_desc(member)|safe -}}
        </td>
    </tr>
    {%- endfor %}
</table>
{%- endmacro %}


{%- macro extra_prop_table(node) -%}
<table border="1">
    <tr>
        <th>Property</th>
        <th>Value</th>
    </tr>
    {%- for prop in extra_properties %}
    {%- if prop in node.list_properties() %}
        <tr>
            <td><code>{{prop}}</code></td>
            <td>{{stringify_rdl_value(node.get_property(prop), node)}}</td>
        </tr>
    {% endif %}
    {%- endfor %}
</table>
{%- endmacro %}