Baseline: Ludic compiler + toolchain, Phase 1 syntax fixes complete
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>
This commit is contained in:
commit
985f9ad8f2
418 changed files with 39065 additions and 0 deletions
20
selfhost/tests/structs.ludic
Normal file
20
selfhost/tests/structs.ludic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue