mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
qapi.py: Permit comments starting anywhere on the line
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1374939721-7876-10-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
28b8bd4c75
commit
f1a145e154
4 changed files with 5 additions and 4 deletions
|
@ -68,13 +68,12 @@ class QAPISchema:
|
|||
|
||||
def accept(self):
|
||||
while True:
|
||||
bol = self.cursor == 0 or self.src[self.cursor-1] == '\n'
|
||||
self.tok = self.src[self.cursor]
|
||||
self.pos = self.cursor
|
||||
self.cursor += 1
|
||||
self.val = None
|
||||
|
||||
if self.tok == '#' and bol:
|
||||
if self.tok == '#':
|
||||
self.cursor = self.src.find('\n', self.cursor)
|
||||
elif self.tok in ['{', '}', ':', ',', '[', ']']:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue