/** ** \file ast/tasks.cc ** \brief Ast Tasks implementation. */ #include #include #define DEFINE_TASKS 1 #include #undef DEFINE_TASKS namespace ast::tasks { // The abstract syntax tree. std::unique_ptr the_program(nullptr); void ast_display() { // `the_program' should have been set by the parse module by now. precondition(the_program) << "Could not dump the AST, root is null"; std::cout << "/* == Abstract Syntax Tree. == */\n" << *the_program << std::endl; } void ast_dump() { // `the_program' should have been set by the parse module by now. precondition(the_program) << "Could not dump the AST, root is null"; ast::dump_dot(*the_program, std::cout); } } // namespace ast::tasks