diff options
author | Tristan Gingold | 2015-01-12 05:02:37 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-01-12 05:02:37 +0100 |
commit | 1147971e306f1f69575a538f4c86a681a1035043 (patch) | |
tree | 0699d721470d4abc90d49d5f011c086e9a0ff639 /src/xtools/pnodes.py | |
parent | 07c30b37ebb7a3a63158990e1e327a62305cec3a (diff) | |
download | ghdl-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-x | src/xtools/pnodes.py | 5 |
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): |