ludic.ui: a rule's selector text is interned - {sel} was sel itself (a template of one string hole passes the string through) and lss_rule frees sel, so rules <id> named whatever reused the bytes; smoke.txt's tree order follows the document, and smoke.py runs the transcript
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e74656c372
commit
a436cfbe35
4 changed files with 38 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ function lss_rule_add(f: UiFile, decls: UiRule, sel: string, err: []string, line
|
|||
let r = new UiRule
|
||||
r.keys = decls.keys
|
||||
r.vals = decls.vals
|
||||
r.text = `{sel}` # a copy: the selector's text is given back below
|
||||
r.text = intern(sel) # a copy: lss_rule frees sel (`{sel}` was sel itself, and dangled)
|
||||
r.at = `{f.path}:{line}`
|
||||
r.sel = sel_parse(sel, err)
|
||||
if r.sel != null {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue