MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / IsDecltype

Function IsDecltype

steps/cpplint.py:4150–4165  ·  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

4148
4149
4150def IsDecltype(clean_lines, linenum, column):
4151 """Check if the token ending on (linenum, column) is decltype().
4152
4153 Args:
4154 clean_lines: A CleansedLines instance containing the file.
4155 linenum: the number of the line to check.
4156 column: end column of the token to check.
4157 Returns:
4158 True if this token is decltype() expression, False otherwise.
4159 """
4160 (text, _, start_col) = ReverseCloseExpression(clean_lines, linenum, column)
4161 if start_col < 0:
4162 return False
4163 if Search(r'\bdecltype\s*$', text[0:start_col]):
4164 return True
4165 return False
4166
4167def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error):
4168 """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