Separate output into its own module

This commit is contained in:
James Westman 2022-10-14 21:04:37 -05:00
parent 8cf793023d
commit a24f16109f
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
33 changed files with 407 additions and 291 deletions

View file

@ -25,7 +25,7 @@ from .errors import PrintableError, report_bug, MultipleErrors
from .lsp import LanguageServer
from . import parser, tokenizer, decompiler, interactive_port
from .utils import Colors
from .xml_emitter import XmlEmitter
from .outputs import XmlOutput
VERSION = "uninstalled"
LIBDIR = None
@ -141,7 +141,9 @@ class BlueprintApp:
if len(ast.errors):
raise MultipleErrors(ast.errors)
return ast.generate(), warnings
formatter = XmlOutput()
return formatter.emit(ast), warnings
def main(version, libdir):