From f00fe3aaca06fb652ae51f44ce82289a4c3ccd5b Mon Sep 17 00:00:00 2001 From: nodist Date: Thu, 7 May 2026 14:23:02 -0400 Subject: type representation --- docs/type_system/enum.md | 2 +- docs/type_system/flag.md | 19 +++++++++++++++++++ docs/type_system/float.md | 14 +++++++++++--- docs/type_system/index.md | 14 +++++++++++--- docs/type_system/int.md | 30 ++++++++++++++++++++---------- mkdocs.yml | 1 + 6 files changed, 63 insertions(+), 17 deletions(-) create mode 100644 docs/type_system/flag.md diff --git a/docs/type_system/enum.md b/docs/type_system/enum.md index 9138286..4abcdb2 100644 --- a/docs/type_system/enum.md +++ b/docs/type_system/enum.md @@ -2,7 +2,7 @@ --- -Unique symbols associated with a type +A symbol associated with a type ```text Enum[.name; ...] // Resoves to Enum[Void; ...] diff --git a/docs/type_system/flag.md b/docs/type_system/flag.md new file mode 100644 index 0000000..45aecfa --- /dev/null +++ b/docs/type_system/flag.md @@ -0,0 +1,19 @@ +# Flag + +--- + +Up to 64 symbols that can be set on and off + +```text +Flag[.name; ...] + +opts : Flag[.a; .b; .c]$.a + +`log opts // Flag[.a; .b;. c].opts$(.a) +``` + +## `add + +## `remove + +## `has diff --git a/docs/type_system/float.md b/docs/type_system/float.md index d0752d0..9657d8d 100644 --- a/docs/type_system/float.md +++ b/docs/type_system/float.md @@ -5,8 +5,16 @@ ```text Float_bit_size : `alias Enum[.bit32; .bit64] -Float[Float_bit_size] +Float_representation : `alias Enum[.ieee; .fixed] -F32 : `alias Float[.bit32] -F64 : `alias Float[.bit64] +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] ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 95706e7..21168b9 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -22,14 +22,12 @@ Denotes that a field that does not resolve to anything * #### [Enum](./enum.md) -* #### Flags +* #### [Flag](./flag.md) * #### [Int](./int.md) * #### [Float](./float.md) -* #### Buffer - ## Transient Templates * #### Option @@ -52,6 +50,10 @@ Denotes that a field that does not resolve to anything * #### Set +* #### Queue + +* #### Union + * #### Namespace ## Function Templates @@ -70,10 +72,16 @@ Denotes that a field that does not resolve to anything ## AST Templates +* #### Literal + * #### Value +* #### Clause + * #### Name +* #### Type + * #### Symbol * #### Op diff --git a/docs/type_system/int.md b/docs/type_system/int.md index 5986c3b..4e28660 100644 --- a/docs/type_system/int.md +++ b/docs/type_system/int.md @@ -5,17 +5,27 @@ ```text Int_bit_size : `alias Enum[.bit8; .bit16; .bit32; .bit64] -Int_signedness : `alias Enum[.signed; .unsigned] +Int_signedness : `alias Enum[.nosign; .unsigned; .signed; .bothsign] -Int[Int_bit_size; Int_signedness] +Int_representation : `alias Enum[.bool; .binary; .octal; .decimal; .hex; .utf8; .utf16; .utf32] -I8 : `alias Int[.bit8; .signed] -I16 : `alias Int[.bit16; .signed] -I32 : `alias Int[.bit32; .signed] -I64 : `alias Int[.bit64; .signed] +Int[Int_bit_size; Int_signedness; Int_representation] +``` + +## Alias + +```text +Bool : `alias Int[.bit8; .nosign; .bool] + +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] -U16 : `alias Int[.bit16; .unsigned] -U32 : `alias Int[.bit32; .unsigned] -U64 : `alias Int[.bit64; .unsigned] +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/mkdocs.yml b/mkdocs.yml index 6c85911..11aa39d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,6 +12,7 @@ nav: - Alias: 'type_system/alias.md' - Unique: 'type_system/unique.md' - Enum: 'type_system/enum.md' + - Flag: 'type_system/flag.md' - Int: 'type_system/int.md' - Float: 'type_system/float.md' -- cgit v1.2.3