From 4c008d258f6fd23fd64e2a6b059448748d7f7d24 Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 13 Jul 2026 17:02:34 -0400 Subject: every type has access to its parent --- docs/application/type.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs/application/type.md') diff --git a/docs/application/type.md b/docs/application/type.md index 793fb14..f028fba 100644 --- a/docs/application/type.md +++ b/docs/application/type.md @@ -21,21 +21,23 @@ typedef union { // 64 Bytes Max } kpl_type_body; +typedef struct { + uint16_t length, line; + int32_t position, module_id; +} kpl_token; + typedef struct _kpl_type { kpl_type_template template; uint8_t qualifiers; uint16_t modifiers; union { - struct { - uint16_t length, line; - uint32_t position, module_id; - } token; + kpl_token token; struct { int32_t id, tree_weight; } var; } meta; _Atomic ssize_t ref_count; - struct _kpl_type *prev, *next; + struct _kpl_type *prev, *next, *parent; kpl_type_body body; } kpl_type; ``` -- cgit v1.2.3