MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / IsDecltype

Function IsDecltype

src/tests/coding/cpplint.py:4137–4152  ·  view source on GitHub ↗

Check if the token ending on (linenum, column) is decltype(). Args: clean_lines: A CleansedLines instance containing the file. linenum: the number of the line to check. column: end column of the token to check. Returns: True if this token is decltype() expression, False otherwis

(clean_lines, linenum, column)

Source from the content-addressed store, hash-verified

4135
4136
4137def IsDecltype(clean_lines, linenum, column):
4138 """Check if the token ending on (linenum, column) is decltype().
4139
4140 Args:
4141 clean_lines: A CleansedLines instance containing the file.
4142 linenum: the number of the line to check.
4143 column: end column of the token to check.
4144 Returns:
4145 True if this token is decltype() expression, False otherwise.
4146 """
4147 (text, _, start_col) = ReverseCloseExpression(clean_lines, linenum, column)
4148 if start_col < 0:
4149 return False
4150 if Search(r'\bdecltype\s*$', text[0:start_col]):
4151 return True
4152 return False
4153
4154def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error):
4155 """Checks for additional blank line issues related to sections.

Callers

nothing calls this directly

Calls 2

ReverseCloseExpressionFunction · 0.85
SearchFunction · 0.85

Tested by

no test coverage detected