MCPcopy Create free account
hub / github.com/alibaba/GraphScope / IsDecltype

Function IsDecltype

analytical_engine/misc/cpplint.py:4140–4155  ·  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

4138
4139
4140def IsDecltype(clean_lines, linenum, column):
4141 """Check if the token ending on (linenum, column) is decltype().
4142
4143 Args:
4144 clean_lines: A CleansedLines instance containing the file.
4145 linenum: the number of the line to check.
4146 column: end column of the token to check.
4147 Returns:
4148 True if this token is decltype() expression, False otherwise.
4149 """
4150 (text, _, start_col) = ReverseCloseExpression(clean_lines, linenum, column)
4151 if start_col < 0:
4152 return False
4153 if Search(r'\bdecltype\s*$', text[0:start_col]):
4154 return True
4155 return False
4156
4157def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error):
4158 """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