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
+10 -5
View File
@@ -7,12 +7,14 @@ icon: Box
### Structs
```mist
pub struct Point {
pub struct Point
{
i32 x,
i32 y,
}
pub struct Generic<T> {
pub struct Generic<T>
{
T value,
}
```
@@ -20,7 +22,8 @@ pub struct Generic<T> {
Fields can be public or private:
```mist
struct User {
struct User
{
pub str& name,
i32 age, // private
}
@@ -29,12 +32,14 @@ struct User {
### Enums
```mist
pub enum Option<T> {
pub enum Option<T>
{
Some(T),
None,
}
pub enum Message {
pub enum Message
{
Quit,
Move(i32, i32),
Write { str& content, i32 length },