Skip to content
Snippets Groups Projects
Commit 90478c9a authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add (temporarily) output of functions sub-AST

parent c013d0d6
Branches
Tags
1 merge request!52Issue/21
......@@ -78,6 +78,16 @@ parser(const std::string& filename)
std::cout << ASTPrinter{*root_node} << '\n';
auto& function_table = root_node->m_symbol_table->functionTable();
for (size_t i_function = 0; i_function < function_table.size(); ++i_function) {
const auto& function_descriptor = function_table[i_function];
std::cout << "function " << rang::fgB::magenta << function_descriptor.name() << rang::style::reset << '\n';
std::cout << ASTPrinter(function_descriptor.domainMappingNode());
std::cout << ASTPrinter(function_descriptor.definitionNode());
std::cout << "--------\n";
}
ExecutionPolicy exec_all;
root_node->execute(exec_all);
std::cout << *(root_node->m_symbol_table) << '\n';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment