Of the "trivial" texts that the current parser can handle, these are now being inserted in obj_events.
14 lines
317 B
Python
14 lines
317 B
Python
def skip_whitespace(lines):
|
|
i = 0
|
|
while lines[i:] and (not lines[i].strip() or lines[i][0] == ';'):
|
|
i += 1
|
|
return lines[i:]
|
|
|
|
def next_line(lines):
|
|
lines = skip_whitespace(lines)
|
|
if not lines:
|
|
return [], None
|
|
else:
|
|
line = lines[0].strip()
|
|
return lines[1:], line
|