wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run

ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 5ffe50ed02
commit 19fcf60599
459 changed files with 17862 additions and 17603 deletions

View file

@ -51,20 +51,20 @@ function act_keyword(r: UiRd, word: string) -> bool {
}
return true
}
function act_run(a: UiAct, e: UiEnv) -> void {
function act_run(ui_st: mut UiState, a: UiAct, e: UiEnv) -> void {
for i in 0 .. len(a.kinds) {
if a.kinds[i] == A_SET { env_set(e, a.names[i], ui_eval(a.exprs[i], e)) }
if a.kinds[i] == A_CALL { ui_eval(a.exprs[i], e) }
if a.kinds[i] == A_EMIT { act_emit(a.names[i], e) }
if a.kinds[i] == A_SET { env_set(ui_st, e, a.names[i], ui_eval(ui_st, a.exprs[i], e)) }
if a.kinds[i] == A_CALL { ui_eval(ui_st, a.exprs[i], e) }
if a.kinds[i] == A_EMIT { act_emit(ui_st, a.names[i], e) }
}
}
function act_emit(name: string, e: UiEnv) -> void {
function act_emit(ui_st: mut UiState, name: string, e: UiEnv) -> void {
var at = e
while at != null {
if at.on_names != null {
for i in 0 .. len(at.on_names) {
if at.on_names[i] == name {
act_run(at.on_acts[i], at.on_envs[i])
act_run(ui_st, at.on_acts[i], at.on_envs[i])
return
}
}