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)
| 5203 | |
| 5204 | |
| 5205 | def IsOutOfLineMethodDefinition(clean_lines, linenum): |
| 5206 | """Check if current line contains an out-of-line method definition. |
| 5207 | |
| 5208 | Args: |
| 5209 | clean_lines: A CleansedLines instance containing the file. |
| 5210 | linenum: The number of the line to check. |
| 5211 | Returns: |
| 5212 | True if current line contains an out-of-line method definition. |
| 5213 | """ |
| 5214 | # Scan back a few lines for start of current function |
| 5215 | for i in xrange(linenum, max(-1, linenum - 10), -1): |
| 5216 | if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]): |
| 5217 | return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None |
| 5218 | return False |
| 5219 | |
| 5220 | |
| 5221 | def IsInitializerList(clean_lines, linenum): |
no test coverage detected