Improved docs (allman syntax)

This commit is contained in:
2026-07-03 22:21:33 +02:00
parent ddf3efdf6e
commit 581390933d
8 changed files with 57 additions and 38 deletions
+1 -5
View File
@@ -42,13 +42,9 @@ unsafe i32 dangerous()
}
```
Function syntax: `[pub] [void | <type>] <name>[<generics>](<params>) [override] { <body> }`
Functions use **Allman brace style** (opening brace on the next line).
### Self Parameter
Methods can take `self`, `mut self`, `&self`, `&mut self` additionally with lifetimes:
Methods can take `self`, `mut self`, `&self`, `&mut self`, and `&'a self` / `&'a mut self` with lifetimes:
```mist
pub void set_value(&mut self, i32 v)