MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / __init__

Method __init__

util/cpplint.py:2314–2335  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2312 """Holds states related to parsing braces."""
2313
2314 def __init__(self):
2315 # Stack for tracking all braces. An object is pushed whenever we
2316 # see a "{", and popped when we see a "}". Only 3 types of
2317 # objects are possible:
2318 # - _ClassInfo: a class or struct.
2319 # - _NamespaceInfo: a namespace.
2320 # - _BlockInfo: some other type of block.
2321 self.stack = []
2322
2323 # Top of the previous stack before each Update().
2324 #
2325 # Because the nesting_stack is updated at the end of each line, we
2326 # had to do some convoluted checks to find out what is the current
2327 # scope at the beginning of the line. This check is simplified by
2328 # saving the previous top of nesting stack.
2329 #
2330 # We could save the full stack, but we only need the top. Copying
2331 # the full nesting stack would slow down cpplint by ~10%.
2332 self.previous_stack_top = []
2333
2334 # Stack of _PreprocessorInfo objects.
2335 self.pp_stack = []
2336
2337 def SeenOpenBrace(self):
2338 """Check if we have seen the opening brace for the innermost block.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected