diff options
Diffstat (limited to 'Tools/cases_generator/tier1_generator.py')
-rw-r--r-- | Tools/cases_generator/tier1_generator.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/cases_generator/tier1_generator.py b/Tools/cases_generator/tier1_generator.py index f4409da..441bb3f 100644 --- a/Tools/cases_generator/tier1_generator.py +++ b/Tools/cases_generator/tier1_generator.py @@ -37,7 +37,10 @@ FOOTER = "#undef TIER_ONE\n" def declare_variable(var: StackItem, out: CWriter) -> None: type, null = type_and_null(var) space = " " if type[-1].isalnum() else "" - out.emit(f"{type}{space}{var.name};\n") + if var.condition: + out.emit(f"{type}{space}{var.name} = {null};\n") + else: + out.emit(f"{type}{space}{var.name};\n") def declare_variables(inst: Instruction, out: CWriter) -> None: |