From a9e4e9f0167ed344e55ba298928a575cabb1de0d Mon Sep 17 00:00:00 2001 From: nodist Date: Sun, 24 May 2026 17:24:28 -0400 Subject: add format string example --- docs/type_system/buffer.md | 6 +++++- docs/type_system/const.md | 4 ++++ docs/type_system/map.md | 12 ++++++++++++ docs/type_system/namespace.md | 12 +++++++++++- docs/type_system/queue.md | 4 +++- docs/type_system/shared.md | 28 +++++++++++++++++++++++++++- docs/type_system/tuple.md | 12 ++++++++++++ 7 files changed, 74 insertions(+), 4 deletions(-) (limited to 'docs/type_system') diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md index 1cfeb37..aa5b0d3 100644 --- a/docs/type_system/buffer.md +++ b/docs/type_system/buffer.md @@ -20,10 +20,12 @@ Vector[Any] `alias Buffer[.type; Any] # Operators -## ``len` +## ``length` ## ``get` +## ``set` + ## ``push` ## ``pop` @@ -31,3 +33,5 @@ Vector[Any] `alias Buffer[.type; Any] ## Concatenate `,` # Iterating + +# Mutating diff --git a/docs/type_system/const.md b/docs/type_system/const.md index 2e32853..db1f683 100644 --- a/docs/type_system/const.md +++ b/docs/type_system/const.md @@ -3,3 +3,7 @@ --- Cannot be changed or mutated + +```text +Const[TYPE] +``` diff --git a/docs/type_system/map.md b/docs/type_system/map.md index 70331e6..feaf853 100644 --- a/docs/type_system/map.md +++ b/docs/type_system/map.md @@ -11,3 +11,15 @@ Map[KEY_TYPE; VALUE_TYPE] ```text Set[Any] `alias Map[Any; Void] ``` + +# Operators + +## ``get` + +## ``set` + +## Concatenate `,` + +# Iterating + +# Mutating diff --git a/docs/type_system/namespace.md b/docs/type_system/namespace.md index 37c7b17..52c3aee 100644 --- a/docs/type_system/namespace.md +++ b/docs/type_system/namespace.md @@ -4,7 +4,7 @@ ```text Namespace_class `alias Enum[.native; .file] -Namespace[Namespace_class; AST; EXPORTS] +Namespace[Namespace_class; EXPORTS] ``` A file with code @@ -13,12 +13,22 @@ A file with code ### \`export +##### Type must be Fn, Overload, Const or Shared to export + ## Imports ### \`import +```text +Namespace : `import Const[String] +``` + ### \`use +```text +Namespace : `use Const[String] +``` + ## Main ### \`is_main diff --git a/docs/type_system/queue.md b/docs/type_system/queue.md index 54f9a4e..bd7a0c4 100644 --- a/docs/type_system/queue.md +++ b/docs/type_system/queue.md @@ -8,7 +8,7 @@ Queue[TYPE] # Operators -## ``len` +## ``length` ## ``get_head` @@ -25,3 +25,5 @@ Queue[TYPE] ## Concatenate `,` # Iterating + +# Mutating diff --git a/docs/type_system/shared.md b/docs/type_system/shared.md index 3982b5e..54c9dc5 100644 --- a/docs/type_system/shared.md +++ b/docs/type_system/shared.md @@ -3,7 +3,33 @@ --- ```text -Shared_collector `alias Enum[.counting; .tracing] +Shared_collector `alias Enum[.unknown; .counting; .tracing] Shared[Shared_collector; TYPE] + +Shared[TYPE] // Resolves to Shared[.unknown; TYPE] +``` + +# Garbage Collection Method + +```text +Shared[TYPE] +``` + +## Unknown + +Counting or tracing will determined later on + +## Counting + +## Tracing + +# Mutating + +```text +x : Shared[Vector] $ (1; 2; 3) +^ x { + y `push 4 +}[y] +`log x // Shared[.counting; Vector[I64]] $ (1; 2; 3; 4) ``` diff --git a/docs/type_system/tuple.md b/docs/type_system/tuple.md index 0c89c67..fc1cdcb 100644 --- a/docs/type_system/tuple.md +++ b/docs/type_system/tuple.md @@ -11,3 +11,15 @@ Tuple[TYPE; TYPE.SYMBOL; ...] # Operators ## ``get` + +## ``set` + +```text +Result[Void] : target `set (KEY; VALUE) + +items : Tuple(1; 2; 3) +items `set (0; 4) +`log items // Tuple[I64; I64; I64] $ (4; 2; 3) +``` + +# Mutating -- cgit v1.2.3