| 293 | # character exists (i.e. EOF) |
| 294 | # |
| 295 | def peekNextMeaningfulChar(lines, filePos): |
| 296 | lineNum, offset = filePos |
| 297 | |
| 298 | while lineNum < len(lines): |
| 299 | line = lines[lineNum] |
| 300 | while offset < len(line): |
| 301 | c = line[offset] |
| 302 | if isprintable(c) and not c.isspace(): |
| 303 | return (c, FilePosition(lineNum, offset)) |
| 304 | offset = offset + 1 |
| 305 | offset = 0 |
| 306 | lineNum = lineNum + 1 |
| 307 | |
| 308 | return None |
| 309 | |
| 310 | # Given a C/C++ source file that have been preprocessed by the GNU |
| 311 | # preprocessor with the -E option, identify all the NanoLog log statements |