#include #include #include #include #include #include "../struct.h" #include "../prettyprint.h" #include "struct.h" #include "prettyprint.h" struct stringtree* user_lambda_value_prettyprint( const struct value* super) { ENTER; assert(super->kind == vk_user_lambda); const struct user_lambda_value* this = &super->subclass.user_lambda; struct stringtree* tree = new_stringtree(); stringtree_append_string_const(tree, "(lambda "); { struct stringtree* parameters = value_prettyprint(this->parameters); stringtree_append_stringtree(tree, parameters); free_stringtree(parameters); } stringtree_append_string_const(tree, " "); { struct stringtree* body = value_prettyprint(this->body); stringtree_append_stringtree(tree, body); free_stringtree(body); } stringtree_append_string_const(tree, ")"); EXIT; return tree; }