提交 c7745622 编写于 作者: R Radostin Stoyanov 提交者: Daniel P. Berrangé

apibuild: Simplify getline()

Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
上级 437f1ead
......@@ -432,21 +432,17 @@ class CLexer:
line = self.input.readline()
if not line:
return None
self.lineno = self.lineno + 1
line = line.lstrip()
line = line.rstrip()
self.lineno += 1
line = line.strip()
if line == '':
continue
while line[-1] == '\\':
line = line[:-1]
n = self.input.readline()
self.lineno = self.lineno + 1
n = n.lstrip()
n = n.rstrip()
n = self.input.readline().strip()
self.lineno += 1
if not n:
break
else:
line = line + n
line += n
return line
def getlineno(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册