Add missing declarations and group them by function so they're easier to
understand at a distance.

Signed-off-by: John Snow <js...@redhat.com>
---
 scripts/qapi/parser.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 55117f5754..b2984c8ff0 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -50,12 +50,19 @@ def __init__(self, fname, previously_included=None, 
incl_info=None):
         self._included = previously_included or set()
         self._included.add(os.path.abspath(self._fname))
 
+        # Lexer state (see `accept` for details):
+        self.tok = None
+        self.pos = 0
         self.cursor = 0
+        self.val = None
         self.info = QAPISourceInfo(self._fname, 1, incl_info)
         self.line_pos = 0
+
+        # Parser output:
         self.exprs = []
         self.docs = []
 
+        # Showtime!
         try:
             fp = open(self._fname, 'r', encoding='utf-8')
             self.src = fp.read()
-- 
2.26.2


Reply via email to