summaryrefslogtreecommitdiff
path: root/src/xtools/pnodes.py
diff options
context:
space:
mode:
authorTristan Gingold2015-01-12 05:02:37 +0100
committerTristan Gingold2015-01-12 05:02:37 +0100
commit1147971e306f1f69575a538f4c86a681a1035043 (patch)
tree0699d721470d4abc90d49d5f011c086e9a0ff639 /src/xtools/pnodes.py
parent07c30b37ebb7a3a63158990e1e327a62305cec3a (diff)
downloadghdl-1147971e306f1f69575a538f4c86a681a1035043.tar.gz
ghdl-1147971e306f1f69575a538f4c86a681a1035043.tar.bz2
ghdl-1147971e306f1f69575a538f4c86a681a1035043.zip
pnodes: add better message in assert.
Diffstat (limited to 'src/xtools/pnodes.py')
-rwxr-xr-xsrc/xtools/pnodes.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xtools/pnodes.py b/src/xtools/pnodes.py
index f621802..adb85b7 100755
--- a/src/xtools/pnodes.py
+++ b/src/xtools/pnodes.py
@@ -433,12 +433,15 @@ def gen_subprg_header(decl):
def gen_assert(func):
print ' pragma Assert (' + func.pname + ' /= Null_Iir);'
- cond = '(Has_' + func.name + ' (Get_Kind (' + func.pname + ')));'
+ cond = '(Has_' + func.name + ' (Get_Kind (' + func.pname + ')),'
+ msg = '"no field ' + func.name + '");'
if len (cond) < 60:
print ' pragma Assert ' + cond
+ print ' ' + msg
else:
print ' pragma Assert'
print ' ' + cond
+ print ' ' + msg
# Generate Get_XXX/Set_XXX subprograms for FUNC.
def gen_get_set(func, nodes, fields):