compiler: text keys below a row, trf padding and tr's cast (ECS's 26.4 gaps) - a @Text Key in a record nested in a row, or in each item of a list of them, is filled with its derived key <registry>.<row>.<field>.<i>.<field> as a top-level one is, and a @Text []Key a row leaves out takes <...>.0, .1, ... for as many as en.po has (so no .lres spells a key; the manifest and en.po are now read before the parse that fills the rows); field: null is no text; trf / trn's trailing "" literals are padding, not counted against the English's holes; and string(x) of a string or a Key is x itself to the escape analysis, no allocation site, so tr(key) passes arena strict (a template's lone hole still copies); examples/lang/i18n_nested and its feat_case (added, not run); LANGUAGE.md and the changeset; reseeded, bootstrap-cfree fixpoint holds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9a0011c38f
commit
10a394ae6c
12 changed files with 75642 additions and 73902 deletions
|
|
@ -104,6 +104,8 @@ function es_local_ty(name: pointer) -> pointer {
|
|||
while i >= 0 { if (g_es_ln[i] == name) { return g_es_lt[i] }; i -= 1 }
|
||||
return null
|
||||
}
|
||||
# a type string() hands back as it is
|
||||
function es_passes(t: pointer) -> bool { return t != null and ((t == "string") or i18n_is_key_ty(t)) }
|
||||
# the static type of an expression, as far as the analysis can tell without emitting it
|
||||
function es_type(e: Node) -> pointer {
|
||||
if e == null { return null }
|
||||
|
|
@ -317,6 +319,9 @@ function es_call(e: Node) -> int {
|
|||
return g_es_heap
|
||||
}
|
||||
if (nm == "string") {
|
||||
# string(s) of a string or a Key is s itself (emit_call.ludic) - no text is made, unless a
|
||||
# template's lone hole copies it
|
||||
if len(e.kids) == 1 and c.uns != TPL_COPY and es_passes(es_type(e.kids[0])) { return es_val(e.kids[0]) }
|
||||
es_args_walk(e)
|
||||
return es_site(e)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue