blob: 8f5a4e7e3cf682a8146fc01cbcf0eec3e9a012b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<%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>
<%def name="render_list(nodes)">
<ul>
% for a in nodes:
<li>${formatter.format_inline(a, formatter.format_xref(a))}</li>
% endfor
</ul>
</%def>
<html>
<body>
<section>
<h1 class="namespace">${node.name}</h1>
</section>
<% nodes = get_types(node, (ast.Class, ast.Interface)) %>
% if len(nodes) > 0:
<h1>Classes</h1>
${render_list(nodes)}
% endif
<% nodes = get_types(node, (ast.Enum)) %>
% if len(nodes) > 0:
<h1>Enums</h1>
${render_list(nodes)}
% endif
<% nodes = get_types(node, (ast.Function)) %>
% if len(nodes) > 0:
<h1>Functions</h1>
${render_list(nodes)}
% endif
<% nodes = get_types(node, (ast.Constant)) %>
% if len(nodes) > 0:
<h1>Constants</h1>
${render_list(nodes)}
% endif
<% nodes = get_types(node, (ast.Property)) %>
% if len(nodes) > 0:
<h1>Properties</h1>
${render_list(nodes)}
% endif
</body>
</html>
|