diff --git a/src/language/ASTNodeValueBuilder.cpp b/src/language/ASTNodeValueBuilder.cpp index 45108d64deed866b5b08d00884fbefe02cb554b8..4e9c0d445a687f9b10b0b667775139bfb3bbb13b 100644 --- a/src/language/ASTNodeValueBuilder.cpp +++ b/src/language/ASTNodeValueBuilder.cpp @@ -5,6 +5,9 @@ #include <EscapedString.hpp> +#include <FunctionTable.hpp> +#include <SymbolTable.hpp> + void ASTNodeValueBuilder::_buildNodeValue(ASTNode& n) { @@ -46,10 +49,19 @@ ASTNodeValueBuilder::_buildNodeValue(ASTNode& n) } } -ASTNodeValueBuilder::ASTNodeValueBuilder(ASTNode& n) +ASTNodeValueBuilder::ASTNodeValueBuilder(ASTNode& node) { - Assert(n.is_root()); - n.m_data_type = ASTNodeDataType::void_t; - this->_buildNodeValue(n); + Assert(node.is_root()); + node.m_data_type = ASTNodeDataType::void_t; + this->_buildNodeValue(node); + + FunctionTable& function_table = node.m_symbol_table->functionTable(); + for (size_t function_id = 0; function_id < function_table.size(); ++function_id) { + FunctionDescriptor& function_descriptor = function_table[function_id]; + ASTNode& function_expression = function_descriptor.definitionNode(); + + this->_buildNodeValue(function_expression); + } + std::cout << " - build node data types\n"; }