mutable decl syntax change

This commit is contained in:
2026-08-05 21:19:41 +02:00
parent 88b94197c9
commit 081a3fd5df
74 changed files with 870 additions and 733 deletions
+6 -6
View File
@@ -2,11 +2,11 @@ Point :: struct {
x i32
}
counter int = 0
ratio float = 1
span range = 0..2
point Point = Point { x = 1 }
values [_]mut i32 = [10, 20]
counter := i32(0)
ratio := 1.0
span := 0..2
point Point := Point { x = 1 }
values [_]mut i32 := [10, 20]
bump func(value @mut i32) void {
value^ += 1
@@ -19,7 +19,7 @@ main func() i32 {
point.x += counter
values[1] = point.x
total i32 = counter + point.x + values[1]
total i32 := counter + point.x + values[1]
for span |i| {
total += i
}