def _add_section(self, node):
"""
Register the current node as a new context block
"""
self._filldown(node.lineno)
# push a new context onto stack
self.context.append(node.name)
self._update_current_context()
for _ in map(self.visit, iter_child_nodes(node)):
pass
# restore current context
self.context.pop()
self._update_current_context()
评论列表
文章目录