More exceptions
This commit is contained in:
@@ -286,7 +286,7 @@ def process_pmgfile(f, filename):
|
|||||||
block["gencode"].append(rewrite_cpp(l.rstrip()))
|
block["gencode"].append(rewrite_cpp(l.rstrip()))
|
||||||
break
|
break
|
||||||
|
|
||||||
assert False
|
raise RuntimeError("'%s' statement not recognised on line %d" % (a[0], linenr))
|
||||||
|
|
||||||
if block["optional"]:
|
if block["optional"]:
|
||||||
assert not block["semioptional"]
|
assert not block["semioptional"]
|
||||||
@@ -328,7 +328,7 @@ def process_pmgfile(f, filename):
|
|||||||
blocks.append(block)
|
blocks.append(block)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
assert False
|
raise RuntimeError("'%s' command not recognised" % cmd)
|
||||||
|
|
||||||
for fn in pmgfiles:
|
for fn in pmgfiles:
|
||||||
with open(fn, "r") as f:
|
with open(fn, "r") as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user