diff options
| -rw-r--r-- | docs/application/identifier.md | 4 | ||||
| -rw-r--r-- | docs/application/type.md | 6 | ||||
| -rw-r--r-- | docs/language/index.md | 6 | ||||
| -rw-r--r-- | docs/type_system/function.md | 4 | ||||
| -rw-r--r-- | docs/type_system/group.md | 6 | ||||
| -rw-r--r-- | docs/type_system/list.md | 2 | ||||
| -rw-r--r-- | docs/type_system/overload.md | 2 | ||||
| -rw-r--r-- | docs/type_system/select.md | 6 | ||||
| -rw-r--r-- | docs/type_system/union.md | 4 | ||||
| -rw-r--r-- | docs/type_system/value.md | 2 | ||||
| -rw-r--r-- | docs/type_system/var.md | 4 |
11 files changed, 26 insertions, 20 deletions
diff --git a/docs/application/identifier.md b/docs/application/identifier.md index 3195955..8f85b15 100644 --- a/docs/application/identifier.md +++ b/docs/application/identifier.md @@ -7,9 +7,9 @@ Store vars, types and symbols as compressed strings ## Object Definitions ```c -#define KPL_IDENTIFIER_PARTS 10 +#define KPL_IDENTIFIER_PARTS 9 -// TODO 100 charaters of [A-Za-z0-9_] in 80 bytes +// TODO 90 charaters of [A-Za-z0-9_] in 72 bytes typedef struct { uint64_t parts[KPL_IDENTIFIER_PARTS]; diff --git a/docs/application/type.md b/docs/application/type.md index e6adc81..43a8f2c 100644 --- a/docs/application/type.md +++ b/docs/application/type.md @@ -24,9 +24,9 @@ typedef struct { kpl_type_template template; uint8_t qualifiers; uint16_t modifiers; - kpl_ptr self; - uint32_t token_position, token_length; - int32_t id; + kpl_ptr self, prev, next; + uint32_t token_position, + uint16_t token_length, token_line; _Atomic int32_t ref_count; kpl_namespace_module *module; kpl_type_body body; diff --git a/docs/language/index.md b/docs/language/index.md index 679ed36..2a8ff49 100644 --- a/docs/language/index.md +++ b/docs/language/index.md @@ -72,10 +72,14 @@ Start with a lowercase letter Variables starting with `_` are treated as unused +### Variables names have a 90 character limit + ## Type Names Start with an uppercase letter created with either \`alias or \`unique +### Type names have a 90 character limit + ## Type Qualifiers Start with `%` @@ -109,6 +113,8 @@ Start with a `.` .symbol ``` +### Symbols have a 90 character limit + # Lists A list of statements between `()` separated by `;` or `\n` diff --git a/docs/type_system/function.md b/docs/type_system/function.md index f6a1f4f..e2e2c4c 100644 --- a/docs/type_system/function.md +++ b/docs/type_system/function.md @@ -11,13 +11,13 @@ STATEFUL : TASK | ITERATOR | CLOSURE | BOUND | REGEX FLAGS : INVOCATION | STATELESS | STATEFUL -Function[[FLAGS]; STATE; List; RETURN_TYPE; Collection[VAR_TREE; TYPE.SYMBOL]] +Function[[FLAGS]; STATE; List; RETURN_TYPE; Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` # Alias ```text -Fn[Generic.T; Collection[VAR_TREE; TYPE.SYMBOL]] `alias Function[[FLAGS]; STATE; List; Generic.T; Collection[VAR_TREE; TYPE.SYMBOL]] +Fn[Generic.T; Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Function[[FLAGS]; STATE; List; Generic.T; Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` # Inline Definition diff --git a/docs/type_system/group.md b/docs/type_system/group.md index d9c2d2d..dcc3c0a 100644 --- a/docs/type_system/group.md +++ b/docs/type_system/group.md @@ -5,15 +5,15 @@ A sequence of different types accessed by index or a symbol mapped to an index ```text -Group[[INDEX | SYMBOL] Collection[VAR_TREE; TYPE.SYMBOL]] +Group[[INDEX | SYMBOL] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` # Alias ```text -Tuple[Collection[TYPE.SYMBOL]] `alias Group[[INDEX] Collection[VAR_TREE; TYPE.SYMBOL]] +Tuple[Collection[TYPE.SYMBOL]] `alias Group[[INDEX] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] -Table[Collection[TYPE.SYMBOL]] `alias Group[[SYMBOL] Collection[VAR_TREE; TYPE.SYMBOL]] +Table[Collection[TYPE.SYMBOL]] `alias Group[[SYMBOL] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` # Operators diff --git a/docs/type_system/list.md b/docs/type_system/list.md index f14a06e..0c90515 100644 --- a/docs/type_system/list.md +++ b/docs/type_system/list.md @@ -3,5 +3,5 @@ --- ```text -List[[ROOT | STATEMENT | DEFINE | ACTION | LOOP | IF | MATCH | MUTATION] Parent; VAR_TREE; TARGET; STATEMENTS ...] +List[[ROOT | STATEMENT | DEFINE | ACTION | LOOP | IF | MATCH | MUTATION] Parent; VAR_TREE_LIST; TARGET; STATEMENTS ...] ``` diff --git a/docs/type_system/overload.md b/docs/type_system/overload.md index 8e02054..fc60602 100644 --- a/docs/type_system/overload.md +++ b/docs/type_system/overload.md @@ -5,7 +5,7 @@ List of complete functions, selected by signature ```text -Overload[[] Collection[VAR_LIST; Function[]]] +Overload[[] Collection[VAR_TREE_LIST; Function[]]] ``` ## Example diff --git a/docs/type_system/select.md b/docs/type_system/select.md index 1b1d05a..5cee24a 100644 --- a/docs/type_system/select.md +++ b/docs/type_system/select.md @@ -5,15 +5,15 @@ A symbol associated with a type ```text -Select[[SINGLE | MULTIPLE] Type; Collection[VAR_TREE; .symbol : %const Value]] +Select[[SINGLE | MULTIPLE] Type; Collection[VAR_TREE_LIST; .symbol : %const Value]] ``` # Alias ```text -Enum[Generic.T; Collection[.symbol : %const Value]] `alias Select[[SINGLE]; Generic.T; Collection[VAR_TREE; .symbol : %const Value]] +Enum[Generic.T; Collection[.symbol : %const Value]] `alias Select[[SINGLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol : %const Value]] -Mask[Generic.T; Collection[.symbol : %const Value]] `alias Select[[MULTIPLE]; Generic.T; Collection[VAR_TREE; .symbol : %const Value]] +Mask[Generic.T; Collection[.symbol : %const Value]] `alias Select[[MULTIPLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol : %const Value]] ``` ## Definition Example diff --git a/docs/type_system/union.md b/docs/type_system/union.md index 5a5b71f..334c443 100644 --- a/docs/type_system/union.md +++ b/docs/type_system/union.md @@ -3,13 +3,13 @@ --- ```text -Union[CONTAINER | TRANSIENT] Collection[VAR_TREE; TYPE.SYMBOL]] +Union[CONTAINER | TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` # Alias ```text -Tag[Collection[VAR_TREE; TYPE.SYMBOL]] `alias Union[[CONTAINER] Collection[VAR_TREE; TYPE.SYMBOL]] +Tag[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[CONTAINER] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` ## Tag Example diff --git a/docs/type_system/value.md b/docs/type_system/value.md index 5cfcf90..d2e23d1 100644 --- a/docs/type_system/value.md +++ b/docs/type_system/value.md @@ -3,5 +3,5 @@ --- ```text -Value[[] TYPE; KPL_CLASS] +Value[[] TYPE; ID; KPL_CLASS] ``` diff --git a/docs/type_system/var.md b/docs/type_system/var.md index 86cbc8e..4e14e1f 100644 --- a/docs/type_system/var.md +++ b/docs/type_system/var.md @@ -3,14 +3,14 @@ --- ```text -Var[[SYMBOL | SCOPE | ARG | LOCAL | LOOP | IF | MATCH | MUTATE] TYPE; VALUE; LEFT_VAR; RIGHT_VAR; TREE_WEIGHT; IDENTIFIER] +Var[[SYMBOL | SCOPE | ARG | LOCAL | LOOP | IF | MATCH | MUTATE] TYPE; LEFT_VAR; RIGHT_VAR; TREE_WEIGHT; IDENTIFIER] ``` ## Type Body Object Definition ```c typedef struct { - kpl_ptr type, prev, next; + kpl_ptr type, left, right; uint32_t tree_weight; kpl_identifier identifier; } type_var_body; |
