Commit 03c45c0e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Ada backend: generate null statements when needed

e.g. if a branch only contains informal or ANY decisions,
generate "null;" to avoid an empty code block in Ada
parent a29169b7
......@@ -146,6 +146,7 @@ Changelog
- Support timer when using process type
- Trigger model check proposal on save only if not checked recently
- Fix Statechart rendering (incl. with process type)
- Ada backend: when a branch is ignored, generate "null"
2.0.1 (02/2018)
- Detect type mismatches when user mixes signed and unsigned variables
......@@ -2411,11 +2411,13 @@ def _decision(dec, branch_to=None, sep='if ', last='end if;', **kwargs):
if dec.kind == 'any':
LOG.warning('Ada backend does not support the "ANY" statement')
code.append('-- "DECISION ANY" statement was ignored')
return code, local_decl
elif dec.kind == 'informal_text':
LOG.warning('Informal decision ignored')
code.append('-- Informal decision was ignored: {}'
return code, local_decl
question_type = dec.question.exprType
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