summaryrefslogtreecommitdiff
path: root/src/hs_type_to_string.c
blob: d0a580c1131e9e2db815c0b9ce8d949bcdd923ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "honeysuckle.h"

const char * hs_type_to_string(hs_type type)
{
   switch(type) {
   case HS_BOOL:
      return "boolean";
   case HS_INT:
      return "integer";
   case HS_NUM:
      return "number";
   case HS_STR:
      return "string";
   case HS_TBL:
      return "table";
   case HS_FUNC:
      return "function";
   case HS_CFUNC:
      return "C function";
   case HS_USER:
      return "userdata";
   case HS_LIGHT:
      return "light userdata";
   case HS_NIL:
      return "nil";
   case HS_ANY:
      return "any";
   default:
      return "(unknown)";
   }
}