MCPcopy Index your code
hub / github.com/tensorflow/tfjs / ResetSection

Method ResetSection

tfjs-backend-wasm/tools/cpplint.py:751–767  ·  view source on GitHub ↗

Reset section checking for preprocessor directive. Args: directive: preprocessor directive (e.g. "if", "else").

(self, directive)

Source from the content-addressed store, hash-verified

749 return -1
750
751 def ResetSection(self, directive):
752 """Reset section checking for preprocessor directive.
753
754 Args:
755 directive: preprocessor directive (e.g. "if", "else").
756 """
757 # The name of the current section.
758 self._section = self._INITIAL_SECTION
759 # The path of last found header.
760 self._last_header = ''
761
762 # Update list of includes. Note that we never pop from the
763 # include list.
764 if directive in ('if', 'ifdef', 'ifndef'):
765 self.include_list.append([])
766 elif directive in ('else', 'elif'):
767 self.include_list[-1] = []
768
769 def SetLastHeader(self, header_path):
770 self._last_header = header_path

Callers 2

__init__Method · 0.95
CheckLanguageFunction · 0.80

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected