Skip to content

Commit a19de82

Browse files
committed
Included ending bracket in code generation for conditional branches
1 parent 3c18a13 commit a19de82

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

MCG/MCG_CGC/mcg_cgc_config_converter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# generate source code modules from the configuration file.
66
#
77
# COPYRIGHT: Copyright (C) 2022-2024 Kamil Deć github.com/deckamil
8-
# DATE: 13 FEB 2024
8+
# DATE: 13 APR 2024
99
#
1010
# LICENSE:
1111
# This file is part of Mod Code Generator (MCG).
@@ -333,6 +333,8 @@ def generate_code_from_config_file(config_file):
333333

334334
# change indent level
335335
indent = Module.INDENT_LEVEL_1
336+
# append end of previous conditional branch
337+
module.operation_body_list.append(indent + "}")
336338
# get branch decision
337339
branch_decision = line[ConfigConverter.BODY_DATA_POSITION_IN_CFG:len(line)]
338340
# append branch decision
@@ -347,6 +349,8 @@ def generate_code_from_config_file(config_file):
347349

348350
# change indent level
349351
indent = Module.INDENT_LEVEL_1
352+
# append end of previous conditional branch
353+
module.operation_body_list.append(indent + "}")
350354
# append branch
351355
module.operation_body_list.append(indent + "else {")
352356
# append new line command

0 commit comments

Comments
 (0)