summaryrefslogtreecommitdiff
path: root/docs/language
diff options
context:
space:
mode:
Diffstat (limited to 'docs/language')
-rw-r--r--docs/language/index.md4
-rw-r--r--docs/language/operators.md2
-rw-r--r--docs/language/ownership.md26
3 files changed, 30 insertions, 2 deletions
diff --git a/docs/language/index.md b/docs/language/index.md
index fe97143..b63d3e4 100644
--- a/docs/language/index.md
+++ b/docs/language/index.md
@@ -133,9 +133,9 @@ Arguments are specified with a `[]` at the beginning of the `{}`
@ condition {[args] statements }
-@ condition {[.name] statements }
+@.name condition { statements }
-@ condition {[.name; args] statements }
+@.name condition {[args] statements }
```
#### If `?`
diff --git a/docs/language/operators.md b/docs/language/operators.md
index d8ae378..7bfdd17 100644
--- a/docs/language/operators.md
+++ b/docs/language/operators.md
@@ -8,6 +8,8 @@
## Cast `$`
+## `log
+
## ``print`
```text
diff --git a/docs/language/ownership.md b/docs/language/ownership.md
index 289846c..9af214b 100644
--- a/docs/language/ownership.md
+++ b/docs/language/ownership.md
@@ -4,10 +4,36 @@
# Copying
+## Assignment
+
# Moving
+## Assignment is not allowed for movable types that are not shared
+
+## Shared Types
+
## To And From Functions
+# Passing
+
+## References
+
+References are automatically taken if the function signature specifies ref
+
+```text
+inc_push_to_ref : Fn[Ref.x; y] $ (
+ x `push y + 1
+)
+int_array : Array[I64] $ ()
+float_array : Array[F64] $ ()
+@ 0 .. 2 {[x]
+ inc_push_to_ref `sync (int_array, x)
+ inc_push_to_ref `sync (float_array, F64 $ x)
+}
+`log int_array // Array[I64] $ (1; 2; 3)
+`log float_array // Array[F64] $ (1.0; 2.0; 3.0)
+```
+
# Locking
## References