mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Separate output into its own module
This commit is contained in:
parent
8cf793023d
commit
a24f16109f
33 changed files with 407 additions and 291 deletions
|
@ -1,6 +1,8 @@
|
|||
import os, sys
|
||||
from pythonfuzz.main import PythonFuzz
|
||||
|
||||
from blueprintcompiler.outputs.xml import XmlOutput
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
from blueprintcompiler import tokenizer, parser, decompiler, gir
|
||||
|
@ -17,8 +19,9 @@ def fuzz(buf):
|
|||
tokens = tokenizer.tokenize(blueprint)
|
||||
ast, errors, warnings = parser.parse(tokens)
|
||||
|
||||
xml = XmlOutput()
|
||||
if errors is None and len(ast.errors) == 0:
|
||||
actual = ast.generate()
|
||||
xml.emit(ast)
|
||||
except CompilerBugError as e:
|
||||
raise e
|
||||
except PrintableError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue