Simplify error & warning handling

This commit is contained in:
James Westman 2022-12-25 17:10:21 -06:00
parent 122b049ce9
commit b6ee649458
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
8 changed files with 38 additions and 21 deletions

View file

@ -26,7 +26,7 @@ def fuzz(buf):
ast, errors, warnings = parser.parse(tokens)
xml = XmlOutput()
if errors is None and len(ast.errors) == 0:
if errors is None and ast is not None:
xml.emit(ast)
except CompilerBugError as e:
raise e