Check if current line contains an out-of-line method definition. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains an out-of-line method definition.
(clean_lines, linenum)
| 4875 | |
| 4876 | |
| 4877 | def IsOutOfLineMethodDefinition(clean_lines, linenum): |
| 4878 | """Check if current line contains an out-of-line method definition. |
| 4879 | |
| 4880 | Args: |
| 4881 | clean_lines: A CleansedLines instance containing the file. |
| 4882 | linenum: The number of the line to check. |
| 4883 | Returns: |
| 4884 | True if current line contains an out-of-line method definition. |
| 4885 | """ |
| 4886 | # Scan back a few lines for start of current function |
| 4887 | for i in range(linenum, max(-1, linenum - 10), -1): |
| 4888 | if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]): |
| 4889 | return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None |
| 4890 | return False |
| 4891 | |
| 4892 | |
| 4893 | def IsInitializerList(clean_lines, linenum): |
no test coverage detected