diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-05-08 10:03:05 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-05-08 10:03:05 -0400 |
| commit | dda8ef8f15662e7621251148eb1b1da7a22f199b (patch) | |
| tree | e19492b2f5ac6710e20c53b09d64ce4e4aec7a3e /docs | |
| parent | f00fe3aaca06fb652ae51f44ce82289a4c3ccd5b (diff) | |
examples with unqiue and operators
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/syntax/cast.md | 3 | ||||
| -rw-r--r-- | docs/syntax/define.md | 7 | ||||
| -rw-r--r-- | docs/syntax/index.md | 2 | ||||
| -rw-r--r-- | docs/type_system/alias.md | 2 | ||||
| -rw-r--r-- | docs/type_system/float.md | 10 | ||||
| -rw-r--r-- | docs/type_system/index.md | 16 | ||||
| -rw-r--r-- | docs/type_system/int.md | 24 | ||||
| -rw-r--r-- | docs/type_system/option.md | 37 | ||||
| -rw-r--r-- | docs/type_system/qualifiers.md | 2 | ||||
| -rw-r--r-- | docs/type_system/result.md | 37 | ||||
| -rw-r--r-- | docs/type_system/unique.md | 16 |
11 files changed, 128 insertions, 28 deletions
diff --git a/docs/syntax/cast.md b/docs/syntax/cast.md new file mode 100644 index 0000000..ab8741e --- /dev/null +++ b/docs/syntax/cast.md @@ -0,0 +1,3 @@ +# Cast `$` + +--- diff --git a/docs/syntax/define.md b/docs/syntax/define.md new file mode 100644 index 0000000..1b55660 --- /dev/null +++ b/docs/syntax/define.md @@ -0,0 +1,7 @@ +# Define + +--- + +## Assign `:` + +## Shadow `::` diff --git a/docs/syntax/index.md b/docs/syntax/index.md index cbea641..45bfb37 100644 --- a/docs/syntax/index.md +++ b/docs/syntax/index.md @@ -1,4 +1,4 @@ -# Syntax +# Code --- diff --git a/docs/type_system/alias.md b/docs/type_system/alias.md index d6acd56..c98722b 100644 --- a/docs/type_system/alias.md +++ b/docs/type_system/alias.md @@ -3,3 +3,5 @@ --- A type based on a complete template that is interchangeable with what it is based on + +## \`alias diff --git a/docs/type_system/float.md b/docs/type_system/float.md index 9657d8d..da2771d 100644 --- a/docs/type_system/float.md +++ b/docs/type_system/float.md @@ -3,9 +3,9 @@ --- ```text -Float_bit_size : `alias Enum[.bit32; .bit64] +Float_bit_size : `alias Enum[.bit32; .bit64; .bit_any] -Float_representation : `alias Enum[.ieee; .fixed] +Float_representation : `alias Enum[.binary; .octal; .decimal; .hex; .exponent] Float[Float_bit_size; Float_representation] ``` @@ -13,8 +13,6 @@ Float[Float_bit_size; Float_representation] ## Alias ```text -F32 : `alias Float[.bit32; .ieee] -F64 : `alias Float[.bit64; .ieee] -Fixed32 : `alias Float[.bit32; .fixed] -Fixed64 : `alias Float[.bit64; .fixed] +F32 `alias Float[.bit32; .decimal] +F64 `alias Float[.bit64; .decimal] ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 21168b9..acec8de 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -30,13 +30,11 @@ Denotes that a field that does not resolve to anything ## Transient Templates -* #### Option +* #### [Option](./option.md) -* #### Result +* #### [Result](./result.md) -## Container Templates - -* #### String +## Nullable Templates * #### Tuple @@ -52,9 +50,13 @@ Denotes that a field that does not resolve to anything * #### Queue +* #### Error + +## Container Templates + * #### Union -* #### Namespace +* #### Shared ## Function Templates @@ -72,7 +74,7 @@ Denotes that a field that does not resolve to anything ## AST Templates -* #### Literal +* #### Token * #### Value diff --git a/docs/type_system/int.md b/docs/type_system/int.md index 4e28660..c03df6b 100644 --- a/docs/type_system/int.md +++ b/docs/type_system/int.md @@ -3,9 +3,9 @@ --- ```text -Int_bit_size : `alias Enum[.bit8; .bit16; .bit32; .bit64] +Int_bit_size : `alias Enum[.bit8; .bit16; .bit32; .bit64; .bit_any] -Int_signedness : `alias Enum[.nosign; .unsigned; .signed; .bothsign] +Int_signedness : `alias Enum[.nosign; .unsigned; .signed; .positive] Int_representation : `alias Enum[.bool; .binary; .octal; .decimal; .hex; .utf8; .utf16; .utf32] @@ -15,17 +15,17 @@ Int[Int_bit_size; Int_signedness; Int_representation] ## Alias ```text -Bool : `alias Int[.bit8; .nosign; .bool] +Bool `alias Int[.bit8; .nosign; .bool] -Char : `alias Int[.bit32; .nosign; .utf8] +Char `alias Int[.bit32; .nosign; .utf8] -U8 : `alias Int[.bit8; .unsigned; .decimal] -U16 : `alias Int[.bit16; .unsigned; .decimal] -U32 : `alias Int[.bit32; .unsigned; .decimal] -U64 : `alias Int[.bit64; .unsigned; .decimal] +U8 `alias Int[.bit8; .unsigned; .decimal] +U16 `alias Int[.bit16; .unsigned; .decimal] +U32 `alias Int[.bit32; .unsigned; .decimal] +U64 `alias Int[.bit64; .unsigned; .decimal] -I8 : `alias Int[.bit8; .signed; .decimal] -I16 : `alias Int[.bit16; .signed; .decimal] -I32 : `alias Int[.bit32; .signed; .decimal] -I64 : `alias Int[.bit64; .signed; .decimal] +I8 `alias Int[.bit8; .signed; .decimal] +I16 `alias Int[.bit16; .signed; .decimal] +I32 `alias Int[.bit32; .signed; .decimal] +I64 `alias Int[.bit64; .signed; .decimal] ``` diff --git a/docs/type_system/option.md b/docs/type_system/option.md new file mode 100644 index 0000000..2532485 --- /dev/null +++ b/docs/type_system/option.md @@ -0,0 +1,37 @@ +# Option + +--- + +A 128bit value status pair, cannot be stored. + +```text +Option[TYPE] +``` + +# Default + +```text +x : // something that returns an option +// x is the value from the option +``` + +If option is none an error is thrown + +# Matching + +```text +# ... { + .some { arg; ... }[arg] + .nome { ... } +} +``` + +## .some + +## .none + +# Return + +## \`some + +## \`none diff --git a/docs/type_system/qualifiers.md b/docs/type_system/qualifiers.md index 1db2e3a..9556d7f 100644 --- a/docs/type_system/qualifiers.md +++ b/docs/type_system/qualifiers.md @@ -9,5 +9,3 @@ ## Lock ## Ref - -## Shared diff --git a/docs/type_system/result.md b/docs/type_system/result.md new file mode 100644 index 0000000..e33f04b --- /dev/null +++ b/docs/type_system/result.md @@ -0,0 +1,37 @@ +# Result + +--- + +A 128bit value error pair, cannot be stored. + +```text +Result[TYPE] +``` + +# Default + +```text +x : // something that returns a result +// x is the value from the result +``` + +If the result is an error, an error is thrown + +# Matching + +```text +# ... { + .ok { arg; ... }[arg] + .error { arg; ... }[arg] +} +``` + +## .ok + +## .error + +# Return + +## \`ok + +## \`error diff --git a/docs/type_system/unique.md b/docs/type_system/unique.md index 4503917..30d0812 100644 --- a/docs/type_system/unique.md +++ b/docs/type_system/unique.md @@ -3,3 +3,19 @@ --- A type based on a complete template or an alias that is not interchangeable with what it is based on + +## \`unique + +# Example + +```text +Inches `unique U64 + +Centimeters `unique U64 + +i : Inches $ 1 + +c : Centimeters $ 1 + +i = c // Type Error +``` |
