diff options
Diffstat (limited to 'docs/type_system')
| -rw-r--r-- | docs/type_system/array.md | 9 | ||||
| -rw-r--r-- | docs/type_system/buffer.md | 17 | ||||
| -rw-r--r-- | docs/type_system/index.md | 20 | ||||
| -rw-r--r-- | docs/type_system/lock.md | 9 | ||||
| -rw-r--r-- | docs/type_system/map.md | 7 | ||||
| -rw-r--r-- | docs/type_system/option.md | 4 | ||||
| -rw-r--r-- | docs/type_system/qualifiers.md | 6 | ||||
| -rw-r--r-- | docs/type_system/set.md | 7 | ||||
| -rw-r--r-- | docs/type_system/table.md | 9 | ||||
| -rw-r--r-- | docs/type_system/tuple.md | 9 | ||||
| -rw-r--r-- | docs/type_system/vector.md | 9 |
11 files changed, 93 insertions, 13 deletions
diff --git a/docs/type_system/array.md b/docs/type_system/array.md new file mode 100644 index 0000000..2433cd5 --- /dev/null +++ b/docs/type_system/array.md @@ -0,0 +1,9 @@ +# Array + +--- + +A sequence of TYPES with known size + +```text +Array[TYPE; Value[Int[...]; ...]] +``` diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md new file mode 100644 index 0000000..5333cee --- /dev/null +++ b/docs/type_system/buffer.md @@ -0,0 +1,17 @@ +# Buffer + +--- + +An sequence of bytes with unknown size and an encoding + +```text +Buffer_encoding : Enum[.byte; .utf8; .utf16; .utf32] + +Buffer[Buffer_encoding] +``` + +## Alias + +``` +String `alias Buffer[.utf8] +``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index acec8de..9c8d477 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -34,26 +34,28 @@ Denotes that a field that does not resolve to anything * #### [Result](./result.md) -## Nullable Templates +* #### [Lock](./lock.md) -* #### Tuple +## Container Templates + +* #### [Tuple](./tuple.md) + +* #### [Table](./table.md) -* #### Table +* #### [Buffer](./buffer.md) -* #### Array +* #### [Array](./array.md) -* #### Vector +* #### [Vector](./vector.md) -* #### Map +* #### [Map](./map.md) -* #### Set +* #### [Set](./set.md) * #### Queue * #### Error -## Container Templates - * #### Union * #### Shared diff --git a/docs/type_system/lock.md b/docs/type_system/lock.md new file mode 100644 index 0000000..0b82088 --- /dev/null +++ b/docs/type_system/lock.md @@ -0,0 +1,9 @@ +# Lock + +--- + +Prevents NAME from being modified while TYPE is accessed as a Ref + +```text +Lock[Name; Ref[TYPE]] +``` diff --git a/docs/type_system/map.md b/docs/type_system/map.md new file mode 100644 index 0000000..4133bd5 --- /dev/null +++ b/docs/type_system/map.md @@ -0,0 +1,7 @@ +# Map + +--- + +```text +Map[KEY_TYPE; VALUE_TYPE] +``` diff --git a/docs/type_system/option.md b/docs/type_system/option.md index 1cc70a7..55e6b76 100644 --- a/docs/type_system/option.md +++ b/docs/type_system/option.md @@ -19,9 +19,9 @@ x : // something that returns an option If option is none an error is thrown -# Use with `Empty` qualifier +## Use with `Empty` qualifier -If the option is assigned to a type with `Empty` an error will not be through if the option is none +If the option is assigned to a type with `Empty`, no error is thrown. The empty value will be `nil` if the option is `none` # Matching diff --git a/docs/type_system/qualifiers.md b/docs/type_system/qualifiers.md index 2244101..8a92086 100644 --- a/docs/type_system/qualifiers.md +++ b/docs/type_system/qualifiers.md @@ -2,8 +2,12 @@ --- +Only one can be applied to a type at a time + # Empty +Specifies that a container template can be NULL + ```text # EMPTY { .some { args; ... }[args] @@ -17,6 +21,4 @@ # Const -# Lock - # Ref diff --git a/docs/type_system/set.md b/docs/type_system/set.md new file mode 100644 index 0000000..51d3f2d --- /dev/null +++ b/docs/type_system/set.md @@ -0,0 +1,7 @@ +# Set + +--- + +```text +Set[TYPE] +``` diff --git a/docs/type_system/table.md b/docs/type_system/table.md new file mode 100644 index 0000000..b94e07a --- /dev/null +++ b/docs/type_system/table.md @@ -0,0 +1,9 @@ +# Table + +--- + +A sequence of different types accessed by symbol + +```text +Table[TYPE.SYMBOL; ...] +``` diff --git a/docs/type_system/tuple.md b/docs/type_system/tuple.md new file mode 100644 index 0000000..81f482f --- /dev/null +++ b/docs/type_system/tuple.md @@ -0,0 +1,9 @@ +# Tuple + +--- + +A sequence of different types accessed by index + +```text +Tuple[TYPE; ...] +``` diff --git a/docs/type_system/vector.md b/docs/type_system/vector.md new file mode 100644 index 0000000..e1f2e23 --- /dev/null +++ b/docs/type_system/vector.md @@ -0,0 +1,9 @@ +# Vector + +--- + +A sequence of TYPES with unknown size + +```text +Vector[TYPE] +``` |
