Self-hosted compiler (selfhost/*.ludic), runtime, examples, editor tooling, and docs. Phase 1 of the syntax-redesign cohesion pass has landed: edge-system fix, signature-query, when-alias, and the documentation truth-pass. Suite green (14/14), C-free bootstrap fixpoint holds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
445 B
Text
20 lines
445 B
Text
game T {
|
|
struct P { x: int = 0, y: int = 7, next: P }
|
|
fn bump(p: P) -> void { p.x = p.x + 100 }
|
|
main {
|
|
let a = new P
|
|
print_int(a.y) # 7 default
|
|
a.x = 5
|
|
let b = a
|
|
b.x = 9
|
|
print_int(a.x) # 9 (reference)
|
|
bump(a)
|
|
print_int(a.x) # 109
|
|
let c = new P
|
|
c.x = 2
|
|
a.next = c
|
|
print_int(a.next.x) # 2 chained
|
|
a.next.x = 42
|
|
print_int(c.x) # 42
|
|
}
|
|
}
|