// vim:fileencoding=utf-8:foldmethod=marker

#ifndef TYPE_ENUMS_H
#define TYPE_ENUMS_H

#include "wapp_core.h"

typedef enum {
  CTYPE_VOID,
  CTYPE_B8,
  CTYPE_CHAR,
  CTYPE_C8,
  CTYPE_C16,
  CTYPE_C32,
  CTYPE_I8,
  CTYPE_I16,
  CTYPE_I32,
  CTYPE_I64,
  CTYPE_U8,
  CTYPE_U16,
  CTYPE_U32,
  CTYPE_U64,
  CTYPE_F32,
  CTYPE_F64,
  CTYPE_F128,
  CTYPE_IPTR,
  CTYPE_UPTR,

  COUNT_CTYPE,
} CType;
wapp_intern Str8RO ctypes[COUNT_CTYPE] = {
  [CTYPE_VOID] = wapp_str8_lit_ro("void"),
  [CTYPE_B8]   = wapp_str8_lit_ro("b8"),
  [CTYPE_CHAR] = wapp_str8_lit_ro("char"),
  [CTYPE_C8]   = wapp_str8_lit_ro("c8"),
  [CTYPE_C16]  = wapp_str8_lit_ro("c16"),
  [CTYPE_C32]  = wapp_str8_lit_ro("c32"),
  [CTYPE_I8]   = wapp_str8_lit_ro("i8"),
  [CTYPE_I16]  = wapp_str8_lit_ro("i16"),
  [CTYPE_I32]  = wapp_str8_lit_ro("i32"),
  [CTYPE_I64]  = wapp_str8_lit_ro("i64"),
  [CTYPE_U8]   = wapp_str8_lit_ro("u8"),
  [CTYPE_U16]  = wapp_str8_lit_ro("u16"),
  [CTYPE_U32]  = wapp_str8_lit_ro("u32"),
  [CTYPE_U64]  = wapp_str8_lit_ro("u64"),
  [CTYPE_F32]  = wapp_str8_lit_ro("f32"),
  [CTYPE_F64]  = wapp_str8_lit_ro("f64"),
  [CTYPE_F128] = wapp_str8_lit_ro("f128"),
  [CTYPE_IPTR] = wapp_str8_lit_ro("iptr"),
  [CTYPE_UPTR] = wapp_str8_lit_ro("uptr"),
};

typedef enum {
  CQUALIFIER_NONE,
  CQUALIFIER_CONST,
  CQUALIFIER_EXTERNAL,
  CQUALIFIER_INTERNAL,
  CQUALIFIER_PERSISTENT,

  COUNT_CQUALIFIER,
} CQualifier;
wapp_intern Str8RO cqualifiers[COUNT_CQUALIFIER] = {
  [CQUALIFIER_NONE]       = wapp_str8_lit_ro(""),
  [CQUALIFIER_CONST]      = wapp_str8_lit_ro("const "),
  [CQUALIFIER_EXTERNAL]   = wapp_str8_lit_ro("wapp_extern "),
  [CQUALIFIER_INTERNAL]   = wapp_str8_lit_ro("wapp_intern "),
  [CQUALIFIER_PERSISTENT] = wapp_str8_lit_ro("wapp_persist "),
};


typedef enum {
  CPOINTERTYPE_NONE,
  CPOINTERTYPE_SINGLE,
  CPOINTERTYPE_DOUBLE,

  COUNT_CPOINTERTYPE,
} CPointerType;
wapp_intern Str8RO cpointertypes[COUNT_CPOINTERTYPE] = {
  [CPOINTERTYPE_NONE]   = wapp_str8_lit_ro(""),
  [CPOINTERTYPE_SINGLE] = wapp_str8_lit_ro("*"),
  [CPOINTERTYPE_DOUBLE] = wapp_str8_lit_ro("**"),
};

#endif // !TYPE_ENUMS_H
