MCPcopy Index your code
hub / github.com/python/cpython / _add_line

Method _add_line

Tools/c-analyzer/c_parser/parser/_info.py:176–189  ·  view source on GitHub ↗
(self, line, lno=None)

Source from the content-addressed store, hash-verified

174 self._set_ready()
175
176 def _add_line(self, line, lno=None):
177 if not line.strip():
178 # We don't worry about multi-line string literals.
179 return
180 if self._current is None:
181 self._start = lno
182 self._current = TextInfo(line, lno)
183 else:
184 # XXX
185 #if lno < self._current.end:
186 # # A circular include?
187 # raise NotImplementedError((lno, self))
188 self._current.add_line(line, lno)
189 self._ready = True

Callers 1

_iter_sourceFunction · 0.95

Calls 3

TextInfoClass · 0.85
add_lineMethod · 0.80
stripMethod · 0.45

Tested by

no test coverage detected