no :: in func decls

This commit is contained in:
2026-06-30 19:31:26 +02:00
parent ae5af37b85
commit 07c560b750
107 changed files with 580 additions and 520 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
# Milestone 5 foundation: booleans, comparisons, logical ops, if/else if/else.
printf :: c_func(format *c_char, ...) c_int
printf c_func(format *c_char, ...) c_int
# Returns a distinct code per range using if / else if / else and comparisons.
classify :: func(n i32) i32 {
classify func(n i32) i32 {
if n < 0 {
return 1
} else if n == 0 {
@@ -17,12 +17,12 @@ classify :: func(n i32) i32 {
# A bool-returning function with a visible side effect, used to prove
# short-circuit evaluation: it must only print when actually evaluated.
noisy :: func() bool {
noisy func() bool {
_ = printf("rhs-evaluated\n")
return true
}
main :: func() i32 {
main func() i32 {
total i32 = 0
# comparisons drive if / else if / else