Xml parse gives back what no node keeps: a closing tag's name, and the text runs and joins an element's text leaves behind (a run a #text node shares is kept); ludic.ui frees an attribute's value once parsed (every reader copies what it keeps) and act_parse's reader

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 00:30:13 +03:00
parent 7b20f305ff
commit 765d800842
3 changed files with 27 additions and 5 deletions

View file

@ -40,6 +40,9 @@ function tpl_read(ui_st: mut UiState, x: Xml, file: string) -> UiTpl {
push(t.keys, k)
push(t.vals, tpl_value(v, err))
}
# the value is parsed (an action, a style, an expression), each copying what it keeps; an
# empty one is the reader's own literal
if len(v) > 0 { unsafe { free(v) } }
}
if tp_mixed(x) { tp_read_mixed(ui_st, t, x, file, err) } else {
for i in 0 .. Xml.child_count(x) { push(t.kids, tpl_read(ui_st, Xml.child(x, i), file)) }