summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorJohn Snow2021-05-19 20:39:39 +0200
committerMarkus Armbruster2021-05-20 11:28:27 +0200
commitb2b31fdf9bc66a82718c9e6ede2f364b0005728a (patch)
treec2bd8ecea4a4536e35000ae291c64290c5ddae0a /scripts/qapi/parser.py
parentqapi: Add test for nonexistent schema file (diff)
downloadqemu-b2b31fdf9bc66a82718c9e6ede2f364b0005728a.tar.gz
qemu-b2b31fdf9bc66a82718c9e6ede2f364b0005728a.tar.xz
qemu-b2b31fdf9bc66a82718c9e6ede2f364b0005728a.zip
qapi/source: Remove line number from QAPISourceInfo initializer
With the QAPISourceInfo(None, None, None) construct gone, there's no longer any reason to have to specify that a file starts on the first line. Remove it from the initializer and default it to 1. Remove the last vestiges where we check for 'line' being unset, that can't happen, now. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210519183951.3946870-4-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/parser.py')
-rw-r--r--scripts/qapi/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index a53b735e7d..39dbcc4eac 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -47,7 +47,7 @@ class QAPISchemaParser:
if self.src == '' or self.src[-1] != '\n':
self.src += '\n'
self.cursor = 0
- self.info = QAPISourceInfo(fname, 1, incl_info)
+ self.info = QAPISourceInfo(fname, incl_info)
self.line_pos = 0
self.exprs = []
self.docs = []