#include #include "val.h" void print_val(Val v) { switch (v.ty) { case TY_NIL: printf("nil\n"); break; case TY_NUM: printf("%f\n",AS_NUM(v)); break; case TY_BOOL: printf("%s\n",AS_BOOL(v) ? "true" : "false"); break; } }