]> git.proxmox.com Git - qemu.git/blobdiff - scripts/qapi.py
qapi.py: Permit comments starting anywhere on the line
[qemu.git] / scripts / qapi.py
index f64b7b26f8d84eb114edf28dc8f8c1479e2c2586..0ebea945bbadaeb62b4a8be5e8fd91ae6135cd59 100644 (file)
@@ -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