qapi script: remember line number in schema parsing
authorWenchao Xia <wenchaoqemu@gmail.com>
Wed, 5 Mar 2014 02:44:33 +0000 (18:44 -0800)
committerLuiz Capitulino <lcapitulino@redhat.com>
Tue, 11 Mar 2014 13:07:41 +0000 (09:07 -0400)
commit515b943a91db6c9faf9e35377c18db9ca32ecb40
treeb851f9774508a2f7c3e5cdb95e802621d3f44e78
parent4b35991a3bd5f9e03333d5b1bd4a7bcf9941aac5
qapi script: remember line number in schema parsing

Before this patch, 'QAPISchemaError' scans whole input until 'pos'
to get error line number. After this patch, the scan is avoided since
line number is remembered in schema parsing. This patch also benefits
other error report functions, which would be introduced later.

Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi.py