def handle_include(self, span, fname):
'''Should be called to signalize change to new file.
Args:
span (tuple of int): Start and end line of the include directive
or None if called the first time for the main input.
fname (str): Name of the file to be included.
'''
self._path.append(self._curnode)
self._curnode = []
self._open_blocks.append(
('include', self._curfile, [span], fname, None))
self._curfile = fname
self._nr_prev_blocks.append(len(self._open_blocks))
评论列表
文章目录