@@ -38,17 +38,5 @@ def __str__(self) -> str:
return f"{loc}: {self.msg}"
-class QAPIParseError(QAPISourceError):
- """Error class for all QAPI schema parsing errors."""
- def __init__(self, parser, msg):
- col = 1
- for ch in parser.src[parser.line_pos:parser.pos]:
- if ch == '\t':
- col = (col + 7) % 8 + 1
- else:
- col += 1
- super().__init__(parser.info, msg, col)
-
-
class QAPISemError(QAPISourceError):
"""Error class for semantic QAPI errors."""
@@ -18,10 +18,22 @@
import re
from collections import OrderedDict
-from .error import QAPIError, QAPIParseError, QAPISemError
+from .error import QAPIError, QAPISourceError, QAPISemError
from .source import QAPISourceInfo
+class QAPIParseError(QAPISourceError):
+ """Error class for all QAPI schema parsing errors."""
+ def __init__(self, parser, msg):
+ col = 1
+ for ch in parser.src[parser.line_pos:parser.pos]:
+ if ch == '\t':
+ col = (col + 7) % 8 + 1
+ else:
+ col += 1
+ super().__init__(parser.info, msg, col)
+
+
class QAPIDocError(QAPIError):
"""Documentation parsing error."""
Signed-off-by: John Snow <jsnow@redhat.com> --- scripts/qapi/error.py | 12 ------------ scripts/qapi/parser.py | 14 +++++++++++++- 2 files changed, 13 insertions(+), 13 deletions(-)