diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/syntax/operators.md | 2 | ||||
| -rw-r--r-- | docs/type_system/bit.md | 103 | ||||
| -rw-r--r-- | docs/type_system/bits.md | 51 | ||||
| -rw-r--r-- | docs/type_system/buffer.md | 2 | ||||
| -rw-r--r-- | docs/type_system/fn.md | 12 | ||||
| -rw-r--r-- | docs/type_system/index.md | 2 | ||||
| -rw-r--r-- | docs/type_system/overload.md | 6 |
7 files changed, 115 insertions, 63 deletions
diff --git a/docs/syntax/operators.md b/docs/syntax/operators.md index 51713d9..b36f44b 100644 --- a/docs/syntax/operators.md +++ b/docs/syntax/operators.md @@ -1,4 +1,4 @@ -# Operators +# General Operators --- diff --git a/docs/type_system/bit.md b/docs/type_system/bit.md new file mode 100644 index 0000000..c787ae9 --- /dev/null +++ b/docs/type_system/bit.md @@ -0,0 +1,103 @@ +# Bit + +--- + +A sequence of bits that can fit into a register + +```text +Bit_size `alias Enum[.bit_any; .bit8; .bit16; .bit32; .bit64; .bit80; .bit128] + +Bit_representation `alias Enum[ + .numeric; .int; .int_unsiged; .int_signed; .float + .utf8; .utf16; .utf32 + .bool + .mask +] + +Bit[Bit_size; Bit_representation] +``` + +# Alias + +```text +Number `alias Bit[.bit_any; .numeric] + +Int `alias Bit[.bit_any; .int] + +Int_unsiged `alias Bit[.bit_any; .int_unsiged] + +U8 `alias Bit[.bit8; .int_unsiged] +U16 `alias Bit[.bit16; .int_unsiged] +U32 `alias Bit[.bit32; .int_unsiged] +U64 `alias Bit[.bit64; .int_unsiged] + +Int_signed `alias Bit[.bit_any; .int_signed] + +I8 `alias Bit[.bit8; .int_signed] +I16 `alias Bit[.bit16; .int_signed] +I32 `alias Bit[.bit32; .int_signed] +I64 `alias Bit[.bit64; .int_signed] + +Float `alias Bit[.bit_any; .float] + +F32 `alias Bit[.bit32; .float] +F64 `alias Bit[.bit64; .float] + +Char `alias Bit[.bit32; .utf8] + +Bool `alias Bit[.bit8; .bool] + +Mask `alias Bit[.bit64; .mask] +``` + +# Operators + +## Arithmetic + +### Add `+` + +### Sub `-` + +### Mul `*` + +### Div `/` + +### Mod `%` + +### ``exp` + +### ``ln` + +## Boolean + +### Not `!` + +### Equal `=` + +### Not Equal `!=` + +### And `&` + +### Or `|` + +### Greater `>` + +### Greater Equal `>=` + +### Less `<` + +### Less Equal `<=` + +## Bitwise + +### ``bit_not` + +### ``bit_and` + +### ``bit_or` + +### ``bit_xor` + +### ``bit_ls` + +### ``bit_rs` diff --git a/docs/type_system/bits.md b/docs/type_system/bits.md deleted file mode 100644 index 122500c..0000000 --- a/docs/type_system/bits.md +++ /dev/null @@ -1,51 +0,0 @@ -# Bits - ---- - -A sequence of bits that can fit into a register - -```text -Bits_size `alias Enum[.bit_any; .bit8; .bit16; .bit32; .bit64; .bit80; .bit128] - -Bits_representation `alias Enum[ - .numeric; .float; .int; .int_unsiged; .int_signed - .ascii; .utf8; .utf16; .utf32 - .bool - .mask -] - -Bits[Bits_size; Bits_representation] -``` - -## Alias - -```text -Number `alias Bits[.bit_any; .numeric] - -Int `alias Bits[.bit_any; .int] - -Int_unsiged `alias Bits[.bit_any; .int_unsiged] - -U8 `alias Bits[.bit8; .int_unsiged] -U16 `alias Bits[.bit16; .int_unsiged] -U32 `alias Bits[.bit32; .int_unsiged] -U64 `alias Bits[.bit64; .int_unsiged] - -Int_signed `alias Bits[.bit_any; .int_signed] - -I8 `alias Bits[.bit8; .int_signed] -I16 `alias Bits[.bit16; .int_signed] -I32 `alias Bits[.bit32; .int_signed] -I64 `alias Bits[.bit64; .int_signed] - -Float `alias Bits[.bit_any; .float] - -F32 `alias Bits[.bit32; .float] -F64 `alias Bits[.bit64; .float] - -Char `alias Bits[.bit32; .utf8] - -Bool `alias Bits[.bit8; .bool] - -Mask `alias Bits[.bit64; .mask] -``` diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md index ef820b4..1f2fed8 100644 --- a/docs/type_system/buffer.md +++ b/docs/type_system/buffer.md @@ -10,7 +10,7 @@ Buffer_repesentation: Enum[.type; .utf8; .utf16; .utf32] Buffer[Buffer_repesentation; TYPE] ``` -## Alias +# Alias ```text String `alias Buffer[.utf8; Void] diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index 78c7918..dbc8251 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -22,12 +22,12 @@ Return `Void` to stop iteration ```text fn : Fn[n] $ ( @ 1 .. n { `yield 2 * x }[x] ) -it : fn `sync 10 +it : fn `call 10 // invoking @ it { `log v }[v] // 2 4 6 8 10 12 14 16 18 20 // same as above @ { - # `sync it { + # `call it { .value { `log v }[v] .done { `break } } @@ -36,15 +36,15 @@ it : fn `sync 10 # Calling -## \`async +## \`fork ```text -task : `async fn +task : `fork fn value : `wait task ``` -## \`sync +## \`call ```text -fn `sync args // `wait fn `async args +fn `call args // `wait fn `task args ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 266f176..59cf118 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -38,7 +38,7 @@ Denotes that a field that does not resolve to anything * #### [Enum](./enum.md) -* #### [Bits](./bits.md) +* #### [Bit](./bit.md) ## Container Templates diff --git a/docs/type_system/overload.md b/docs/type_system/overload.md index dff2327..116ce0e 100644 --- a/docs/type_system/overload.md +++ b/docs/type_system/overload.md @@ -13,7 +13,7 @@ Overload[FN; ...] ```text add : Overload[Fn[.native; I64; Tuple[I64.x; I64.y]; ...]; Fn[.native; F64; Tuple[F64.x; F64.y]; ...]; ...] -`log add `sync (1; 2) // Valid calls first -`log add `sync (1.1; 2.2) // Valid calls second -`log add `sync (1; 2.2) // Invalid no signature match +`log add `call (1; 2) // Valid calls first +`log add `call (1.1; 2.2) // Valid calls second +`log add `call (1; 2.2) // Invalid no signature match ``` |
