:type i: int :type declstartpos: int :rtype: Tuple[Optional[str], int]
(self, i, declstartpos)
| 293 | _new_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9:]*\s*').match |
| 294 | |
| 295 | def _scan_name(self, i, declstartpos): |
| 296 | """ |
| 297 | :type i: int |
| 298 | :type declstartpos: int |
| 299 | :rtype: Tuple[Optional[str], int] |
| 300 | """ |
| 301 | |
| 302 | rawdata = self.rawdata |
| 303 | n = len(rawdata) |
| 304 | if i == n: |
| 305 | return None, -1 |
| 306 | m = self._new_declname_match(rawdata, i) |
| 307 | if m: |
| 308 | s = m.group() |
| 309 | name = s.strip() |
| 310 | if (i + len(s)) == n: |
| 311 | return None, -1 # end of buffer |
| 312 | return name.lower(), m.end() |
| 313 | else: |
| 314 | self.handle_data(rawdata) |
| 315 | # self.updatepos(declstartpos, i) |
| 316 | return None, -1 |
| 317 | |
| 318 | @staticmethod |
| 319 | def convert_charref(name): |
nothing calls this directly
no test coverage detected