GodotScript.hpp: Fix GodotScript constants after the last commit

Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404-59 2025-04-08 14:36:22 +02:00
parent 333b15cfe0
commit 348da1eaa3
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -9,7 +9,9 @@ struct GsTarget: Target {
make_task(Define<false>,
const optional previous = parsedTree.findReferenceByName<Define<false>>(parseComponent.name);
if (previous.has_value() and &previous.value().get() == &parseComponent) { // TODO Recursively traverse the parsedTree's parents and their parents to find existing definitions and do it in semantic analysis
output << (parseComponent.final ? "const " : "var ");
output << "var ";
} else if (parseComponent.final) {
output << "const ";
}
output << parseComponent.name << " = ";
transpileTree(parseComponent.content);