lisp-take-1/value/integer/prettyprint.c

31 lines
556 B
C

#include <assert.h>
#include <inttypes.h>
#include <debug.h>
#include <stringtree/new.h>
#include <stringtree/append.h>
#include "../struct.h"
#include "struct.h"
#include "prettyprint.h"
struct stringtree* integer_value_prettyprint(
const struct value* super)
{
ENTER;
assert(super->kind == vk_integer);
const struct integer_value* this = &super->subclass.integer;
struct stringtree* tree = new_stringtree();
stringtree_append_formatstr(tree, "%" PRIiMAX, this->value);
EXIT;
return tree;
}