From 9b85a273505ae190649c42bcf52f750e9c875fbe Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 14 Apr 2018 10:50:09 +0300 Subject: [PATCH] Visit generated assignments in InterfaceGenerator --- source/programcompiler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index e03e64cd..9761177a 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -860,6 +860,7 @@ void ProgramCompiler::InterfaceGenerator::insert_assignment(const string &left, ExpressionStatement *stmt = new ExpressionStatement; stmt->expression = assign; + stmt->visit(*this); insert_nodes.push_back(stmt); } @@ -891,7 +892,10 @@ void ProgramCompiler::InterfaceGenerator::visit(VariableDeclaration &var) { remove_node = true; if(var.init_expression) + { insert_assignment(var.name, var.init_expression->clone()); + return; + } } } else if(var.interface=="in") -- 2.43.0