Reset section checking for preprocessor directive. Args: directive: preprocessor directive (e.g. "if", "else").
(self, directive)
| 1270 | return -1 |
| 1271 | |
| 1272 | def ResetSection(self, directive): |
| 1273 | """Reset section checking for preprocessor directive. |
| 1274 | |
| 1275 | Args: |
| 1276 | directive: preprocessor directive (e.g. "if", "else"). |
| 1277 | """ |
| 1278 | # The name of the current section. |
| 1279 | self._section = self._INITIAL_SECTION |
| 1280 | # The path of last found header. |
| 1281 | self._last_header = "" |
| 1282 | |
| 1283 | # Update list of includes. Note that we never pop from the |
| 1284 | # include list. |
| 1285 | if directive in ("if", "ifdef", "ifndef"): |
| 1286 | self.include_list.append([]) |
| 1287 | elif directive in ("else", "elif"): |
| 1288 | self.include_list[-1] = [] |
| 1289 | |
| 1290 | def SetLastHeader(self, header_path): |
| 1291 | self._last_header = header_path |
no outgoing calls
no test coverage detected