wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters

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 3eda72e8c2
commit 5ffe50ed02
463 changed files with 72045 additions and 67421 deletions

View file

@ -6,9 +6,9 @@ function lib_find(names: []string, name: string) -> int {
}
return -1
}
function lib_new(ui_st: mut UiState, path: string) -> UiFile {
function lib_new(path: string) -> UiFile {
let f = lib_blank(path)
push(ui_st.lib_files, f)
push(lib_files, f)
return f
}
# a file that is not one of the loaded ones (a component's own)
@ -23,9 +23,9 @@ function lib_blank(path: string) -> UiFile {
f.own = new []UiRule
return f
}
function lib_text(ui_st: UiState, path: string) -> string {
function lib_text(path: string) -> string {
var src = ""
if ui_st.ui_be != null and ui_st.ui_be.read != null { src = ui_st.ui_be.read(path) } else { src = Fs.read_text(path) }
if ui_be != null and ui_be.read != null { src = ui_be.read(path) } else { src = Fs.read_text(path) }
if src == null { return "" }
return src
}