| @@ 3781-3796 (lines=16) @@ | ||
| 3778 | 'statement, use {} instead.') |
|
| 3779 | ||
| 3780 | ||
| 3781 | def IsDecltype(clean_lines, linenum, column): |
|
| 3782 | """Check if the token ending on (linenum, column) is decltype(). |
|
| 3783 | ||
| 3784 | Args: |
|
| 3785 | clean_lines: A CleansedLines instance containing the file. |
|
| 3786 | linenum: the number of the line to check. |
|
| 3787 | column: end column of the token to check. |
|
| 3788 | Returns: |
|
| 3789 | True if this token is decltype() expression, False otherwise. |
|
| 3790 | """ |
|
| 3791 | (text, _, start_col) = ReverseCloseExpression(clean_lines, linenum, column) |
|
| 3792 | if start_col < 0: |
|
| 3793 | return False |
|
| 3794 | if Search(r'\bdecltype\s*$', text[0:start_col]): |
|
| 3795 | return True |
|
| 3796 | return False |
|
| 3797 | ||
| 3798 | def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): |
|
| 3799 | """Checks for additional blank line issues related to sections. |
|
| @@ 3781-3796 (lines=16) @@ | ||
| 3778 | 'statement, use {} instead.') |
|
| 3779 | ||
| 3780 | ||
| 3781 | def IsDecltype(clean_lines, linenum, column): |
|
| 3782 | """Check if the token ending on (linenum, column) is decltype(). |
|
| 3783 | ||
| 3784 | Args: |
|
| 3785 | clean_lines: A CleansedLines instance containing the file. |
|
| 3786 | linenum: the number of the line to check. |
|
| 3787 | column: end column of the token to check. |
|
| 3788 | Returns: |
|
| 3789 | True if this token is decltype() expression, False otherwise. |
|
| 3790 | """ |
|
| 3791 | (text, _, start_col) = ReverseCloseExpression(clean_lines, linenum, column) |
|
| 3792 | if start_col < 0: |
|
| 3793 | return False |
|
| 3794 | if Search(r'\bdecltype\s*$', text[0:start_col]): |
|
| 3795 | return True |
|
| 3796 | return False |
|
| 3797 | ||
| 3798 | def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): |
|
| 3799 | """Checks for additional blank line issues related to sections. |
|