def _get_included_content(self, fname, spans, includefname, content):
includefile = spans[0] is not None
out = []
if self._linenums and not self._diverted:
if includefile or self._linenum_gfortran5:
out += linenumdir(0, includefname, _LINENUM_NEW_FILE)
else:
out += linenumdir(0, includefname)
outcont, ieval, peval = self._render(content)
ieval = _shiftinds(ieval, len(out))
out += outcont
if self._linenums and not self._diverted and includefile:
out += linenumdir(spans[0][1], fname, _LINENUM_RETURN_TO_FILE)
return out, ieval, peval
评论列表
文章目录