<%def name="get_types(n, types)"> <% nodes = [] %> % for a in n.values(): % if isinstance(a, types): % if formatter.should_render_node(a): <% nodes.append(a) %> % endif % endif % endfor <% return nodes %> <%def name="render_list(nodes)">

${node.name}

<% nodes = get_types(node, (ast.Class, ast.Interface)) %> % if len(nodes) > 0:

Classes

${render_list(nodes)} % endif <% nodes = get_types(node, (ast.Enum)) %> % if len(nodes) > 0:

Enums

${render_list(nodes)} % endif <% nodes = get_types(node, (ast.Function)) %> % if len(nodes) > 0:

Functions

${render_list(nodes)} % endif <% nodes = get_types(node, (ast.Constant)) %> % if len(nodes) > 0:

Constants

${render_list(nodes)} % endif <% nodes = get_types(node, (ast.Property)) %> % if len(nodes) > 0:

Properties

${render_list(nodes)} % endif