Xml.free gives back a parsed tree's records and lists (never its strings) and the parser's cursor is freed; ludic.ui frees a template's XML once built, sel_parse's and ex_parse's readers, lss_rule's declarations holder, and px_cmp no longer makes a list of its operators per call
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3816d9924b
commit
7b20f305ff
8 changed files with 40 additions and 8 deletions
|
|
@ -48,10 +48,13 @@ function px_bin(op: string, a: UiExpr, b: UiExpr) -> UiExpr {
|
|||
}
|
||||
function px_cmp(r: UiRd) -> UiExpr {
|
||||
let a = px_sum(r)
|
||||
let ops = ["==", "!=", "<=", ">=", "<", ">"]
|
||||
for k in 0 .. len(ops) {
|
||||
if rd_op(r, ops[k]) { return px_bin(ops[k], a, px_sum(r)) }
|
||||
}
|
||||
# literals, longest first: a list of them was made on every call
|
||||
if rd_op(r, "==") { return px_bin("==", a, px_sum(r)) }
|
||||
if rd_op(r, "!=") { return px_bin("!=", a, px_sum(r)) }
|
||||
if rd_op(r, "<=") { return px_bin("<=", a, px_sum(r)) }
|
||||
if rd_op(r, ">=") { return px_bin(">=", a, px_sum(r)) }
|
||||
if rd_op(r, "<") { return px_bin("<", a, px_sum(r)) }
|
||||
if rd_op(r, ">") { return px_bin(">", a, px_sum(r)) }
|
||||
return a
|
||||
}
|
||||
function px_sum(r: UiRd) -> UiExpr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue