#include #include /*#include */ #include #include #include #include #include #include "struct.h" #include "prettyprint.h" struct stringtree* application_expression_prettyprint( int *out_chosen_color, struct expression* super, bool with_color) { ENTER; struct application_expression* const this = (void*) super; int left_color, right_color; struct stringtree* left = expression_prettyprint( &left_color, this->left, with_color); struct stringtree* right = expression_prettyprint( &right_color, this->right, with_color); if (with_color && out_chosen_color) { *out_chosen_color = MAX(left_color, right_color); } struct stringtree* tree = new_stringtree(); stringtree_append_stringtree(tree, left); stringtree_append_cstr(tree, L" "); stringtree_append_stringtree(tree, right); free_stringtree(left); free_stringtree(right); EXIT; return tree; }