summaryrefslogtreecommitdiff
path: root/docs/type_system
diff options
context:
space:
mode:
Diffstat (limited to 'docs/type_system')
-rw-r--r--docs/type_system/generic.md9
-rw-r--r--docs/type_system/ir.md4
-rw-r--r--docs/type_system/list.md4
-rw-r--r--docs/type_system/op.md5
-rw-r--r--docs/type_system/select.md4
-rw-r--r--docs/type_system/var.md2
6 files changed, 19 insertions, 9 deletions
diff --git a/docs/type_system/generic.md b/docs/type_system/generic.md
index 2b9a89f..e028788 100644
--- a/docs/type_system/generic.md
+++ b/docs/type_system/generic.md
@@ -11,6 +11,7 @@ Generic[[TYPE | SYMBOL] TARGET; Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
```c
typedef struct {
kpl_type *target, *var_tree, *var_list;
+ kpl_identifier identifier;
} kpl_type_body_generic;
```
@@ -19,14 +20,14 @@ typedef struct {
```text
ints : Set[I64] $ ()
/*
-ints -> Name[[DATA] Var[[LOCAL] Generic[[TYPE] REF_SET; Symbol[Void; REF_I64; T]; ints]; ints]
-REF_SET -> Name[[ALIAS] Map[Symbol[Void; Generic[[SYMBOL]]; T]; Void]; Set]
+ints -> Name[[DATA] Var[[LOCAL] Generic[[TYPE] REF_SET; Var[[GENERIC] REF_I64; T]; ints]; ints]
+REF_SET -> Name[[ALIAS] Map[Generic[[SYMBOL] T]; Void]; Set]
REF_I64 -> Name[[Alias] Bit[[BIT64 | INT_SIGNED]]; I64]
*/
floats : Array[F64] $ ()
/*
-floats -> Name[[DATA] Var[[LOCAL] Generic[[TYPE] REF_ARRAY; Symbol[Void; REF_F64; T]; floats]; floats]
-REF_ARRAY -> Name[[ALIAS] Buffer[[TYPE] Symbol[Void; Generic[[SYMBOL]]; T]; Array]
+floats -> Name[[DATA] Var[[LOCAL] Generic[[TYPE] REF_ARRAY; Var[[GENERIC] REF_F64; T]; floats]; floats]
+REF_ARRAY -> Name[[ALIAS] Buffer[[TYPE] Generic[[SYMBOL]; T]; Array]
REF_F64 -> Name[[Alias] Bit[BIT64 | FLOAT]; F64]
*/
```
diff --git a/docs/type_system/ir.md b/docs/type_system/ir.md
index 4b9ea44..9ebfd79 100644
--- a/docs/type_system/ir.md
+++ b/docs/type_system/ir.md
@@ -15,4 +15,8 @@ typedef struct {
ssize_t label;
kpl_type *address[6];
} kpl_type_body_ir;
+
+typedef enum : uint16_t {
+
+} kpl_ir_name;
```
diff --git a/docs/type_system/list.md b/docs/type_system/list.md
index bce9361..958bcfb 100644
--- a/docs/type_system/list.md
+++ b/docs/type_system/list.md
@@ -3,14 +3,14 @@
---
```text
-List[[STATEMENT | DEFINE | ACTION | LOOP | IF | MATCH | MUTATION] TARGET; DEFINED; NAMED; FUNCTION; VAR_TREE; Collection[LIST; TYPE]]
+List[[STATEMENT | DEFINE | ACTION | LOOP | IF | MATCH | MUTATION] TARGET; DEFINED; NAMED; LIST; FUNCTION; VAR_TREE; Collection[LIST; TYPE]]
```
## Type Body Object Definitions
```c
typedef struct {
- kpl_type *target, *defined, *named, *function; *var_tree, *statement_list;
+ kpl_type *target, *defined, *named, *list, *function; *var_tree, *statement_list;
} kpl_type_body_list;
```
diff --git a/docs/type_system/op.md b/docs/type_system/op.md
index f5b935a..868c41b 100644
--- a/docs/type_system/op.md
+++ b/docs/type_system/op.md
@@ -14,3 +14,8 @@ Op[[OP_NAME] RETURN_TYPE; LEFT_TYPE; RIGHT_TYPE]
typedef struct {
kpl_type *return_type, *statement_left, *statement_right;
} kpl_type_body_op;
+
+typedef enum : uint16_t {
+
+} kpl_op_name;
+```
diff --git a/docs/type_system/select.md b/docs/type_system/select.md
index 9218b56..31ad83c 100644
--- a/docs/type_system/select.md
+++ b/docs/type_system/select.md
@@ -27,6 +27,6 @@ Mask `definition Select[[MASK]; Void; Collection[VAR_TREE_LIST; .symbol]]
## Definition Example
```text
-E : Enum[I64; .a; .b; .c]
-`log E // Enum[I64; .a : 0; .b : 1; .c : 2]
+e : Enum[I64; .a; .b; .c]
+`log E // Select[[ENUM] I64; .a : 0; .b : 1; .c : 2]
```
diff --git a/docs/type_system/var.md b/docs/type_system/var.md
index 6bf114d..4d88c5b 100644
--- a/docs/type_system/var.md
+++ b/docs/type_system/var.md
@@ -3,7 +3,7 @@
---
```text
-Var[[SYMBOL | SCOPE | ARG | LOCAL | LOOP | IF | MATCH | MUTATE] TYPE; LEFT_VAR; RIGHT_VAR; IDENTIFIER]
+Var[[GENERIC | ARG | LOCAL | LOOP | IF | MATCH | MUTATE] TYPE; LEFT_VAR; RIGHT_VAR; IDENTIFIER]
```
## Type Body Object Definition