Commit 4f3adceb authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix syntax error in generated textboxes

When working with systems that include declarations made outside from a
CIF-textbox the tool creates a textbox to visualize these declarations.
There was a syntax error in how procedure declaration were rendered.
This error was only visual and had no impact on the system.
parent 95279b67
......@@ -74,21 +74,21 @@ def _block(ast, scene):
if not ast.parent.text_areas:
# If signals are declared outside from a textbox, create one
signals = ["signal {si[name]}{param};\n".format(si=sig,
param=('(' + sig['type'].ReferencedTypeName.replace('-', '_') + ')')
if 'type' in sig else '')
param=('(' + sig['type'].ReferencedTypeName.replace('-', '_') + ')')
if 'type' in sig else '')
for sig in ast.parent.signals]
procedures = ["procedure {proc.inputString};\n{fpar}\nexternal;\n"
([" fpar {direc} {fpar[name]} {asn1};"
fpar="fpar\n " + u",\n ".join
([u"{direc} {fpar[name]} {asn1}"
if fpar['direction']=='in'
else 'in/out',
'ReferencedTypeName', 'ERROR')
'ReferencedTypeName', 'TYPE_ERROR')
.replace('-', '_'))
for fpar in proc.fpar]))
for fpar in proc.fpar]) + ';')
for proc in ast.parent.procedures]
if signals or procedures:
text_area = ogAST.TextArea()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment