From 76cc701dd768b0cc5a2b015430fbed1a8ffd33d4 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Wed, 1 Jan 2025 04:30:12 +0100 Subject: [PATCH] Py.hpp, GodotScript.hpp: Add missing pass after empty else branches Signed-off-by: Username404-59 --- src/headers/transpiler/implementations/GodotScript.hpp | 1 + src/headers/transpiler/implementations/Py.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/headers/transpiler/implementations/GodotScript.hpp b/src/headers/transpiler/implementations/GodotScript.hpp index 2ffab10..842aeff 100644 --- a/src/headers/transpiler/implementations/GodotScript.hpp +++ b/src/headers/transpiler/implementations/GodotScript.hpp @@ -33,6 +33,7 @@ struct GsTarget: Target { } else output << "else"; output << ':' << separator << indentation; separate_transpileTree(parseComponent, 1); + if (parseComponent.empty()) output << "pass"; ) }; } diff --git a/src/headers/transpiler/implementations/Py.hpp b/src/headers/transpiler/implementations/Py.hpp index f9ed112..b55250c 100644 --- a/src/headers/transpiler/implementations/Py.hpp +++ b/src/headers/transpiler/implementations/Py.hpp @@ -31,6 +31,7 @@ struct PyTarget: Target { } else output << "else"; output << ':' << separator << indentation; separate_transpileTree(parseComponent, 1); + if (parseComponent.empty()) output << "pass"; ), make_task(StandardComponents::Reference, if (parseComponent.name == "true" or parseComponent.name == "false") {