From: Mikko Rasa Date: Sat, 14 Apr 2018 07:50:09 +0000 (+0300) Subject: Visit generated assignments in InterfaceGenerator X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9b85a273505ae190649c42bcf52f750e9c875fbe;p=libs%2Fgl.git Visit generated assignments in InterfaceGenerator --- 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")