summaryrefslogtreecommitdiff
path: root/docs/application/type.md
blob: 5377cf6e94881ed11b44a76ec9d6ffe170045dee (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
32
33
34
35
# Type

---

## Object Definitions

```c
typedef enum : uint8_t {
    // ...
} kpl_type_template;

typedef enum {
    CONST   = 1 << 0,
    EMPTY   = 1 << 1,
    REF     = 1 << 2,
    SHARED  = 1 << 3
} kpl_type_qualifiers;

typedef union {
    // ...
} kpl_type_body;

typedef struct {
    kpl_type_template template;
    uint8_t qualifiers;
    uint16_t modifiers;
    _Atomic int32_t ref_count;
    kpl_namespace_module *module;
    uint32_t token_line, token_position, token_length;
    kpl_ptr self;
    kpl_type_body body;
} kpl_type;

// TODO SLAB WITH POOL
```