MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / peekNextMeaningfulChar

Function peekNextMeaningfulChar

preprocessor/parser.py:295–308  ·  view source on GitHub ↗
(lines, filePos)

Source from the content-addressed store, hash-verified

293# character exists (i.e. EOF)
294#
295def 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

Callers 3

parseLogStatementFunction · 0.85
processFileFunction · 0.85

Calls 1

isprintableFunction · 0.85

Tested by 1