mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add warning for sync-create
This commit is contained in:
parent
32d4769f65
commit
9873a2072b
8 changed files with 62 additions and 19 deletions
|
@ -38,12 +38,14 @@ class TestSamples(unittest.TestCase):
|
|||
expected = f.read()
|
||||
|
||||
tokens = tokenizer.tokenize(blueprint)
|
||||
ast, errors = parser.parse(tokens)
|
||||
ast, errors, warnings = parser.parse(tokens)
|
||||
|
||||
if errors:
|
||||
raise errors
|
||||
if len(ast.errors):
|
||||
raise MultipleErrors(ast.errors)
|
||||
if len(warnings):
|
||||
raise MultipleErrors(warnings)
|
||||
|
||||
actual = ast.generate()
|
||||
if actual.strip() != expected.strip(): # pragma: no cover
|
||||
|
@ -63,12 +65,14 @@ class TestSamples(unittest.TestCase):
|
|||
expected = f.read()
|
||||
|
||||
tokens = tokenizer.tokenize(blueprint)
|
||||
ast, errors = parser.parse(tokens)
|
||||
ast, errors, warnings = parser.parse(tokens)
|
||||
|
||||
if errors:
|
||||
raise errors
|
||||
if len(ast.errors):
|
||||
raise MultipleErrors(ast.errors)
|
||||
if len(warnings):
|
||||
raise MultipleErrors(warnings)
|
||||
except PrintableError as e:
|
||||
def error_str(error):
|
||||
line, col = utils.idx_to_pos(error.start + 1, blueprint)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue