code wiki / _hdl_build / nx_pattern_emit12.nx

nx_pattern_emit12.nx

buildroot/runtime/_hdl_build/nx_pattern_emit12.nx

10637 B160 linesdepth 3pulls 3 transitivereach 6 importersview sourcekind librarytopic pattern
docsdependenciesstructsconstsfunctions

about

nx_pattern_emit12.nx -- PATTERN EMITTER: TEMPLATE_TABLE (shape 17). The Builder authors an HTML-fragment renderer CORE from a row table: each row = (kind:i64, open:*u8, mid:*u8, close:*u8, raw:i64). The authored <name>_one(kind, payload, plen, out, cap) emits open + payload + close; raw=0 payloads are ESCAPED via the gated hs_escape (the render-boundary law), raw=1 payloads are inserted verbatim (caller pre-sanitized rich text -- the sanitize-on-WRITE law); a non-empty mid makes the row TWO-SLOT (payload split at the first '|', both slots through the same mode, the <img src|alt> shape). Unknown kind -> -1 (refused, never silently coerced). The table is DATA (rule 11): no per-kind markup lives anywhere but the table. Test emission derives byte-exact KATs from the table itself (expected strings concatenated AT EMIT TIME), plus an escape KAT on the first escaping row and a mechanically-derived unknown-kind refusal. This is the CMS block-renderer shape (also nav menus, breadcrumbs, OG/meta tag lists). Extends the emit1-11 family. LAWS: struct-free, integer-only, flat ifs, no Claude core logic in the AUTHORED module. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_pattern_emit.nx nx_syscalls.nx nx_pattern_emit12.nx nx_cms_blocks_team.nx nx_cms_seo_team.nx nx_warden_build.nx

imports: nx_pattern_emit.nxnx_syscalls.nx

imported by: nx_cms_blocks_team.nxnx_cms_seo_team.nxnx_warden_build.nx

structs

none

consts

none

functions

18func pe12_wq(fd: i64, s: *u8) -> i64
38func pe12_wqbody(fd: i64, s: *u8) -> i64
55func pe12_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
59func pe12_emit_template_table(fd: i64, name: *u8, t: *i64, nt: i64) -> i64
107func pe12_emit_template_table_test(fd: i64, name: *u8, t: *i64, nt: i64) -> i64
154func pe12_author_template_table(name: *u8, modpath: *u8, testpath: *u8, t: *i64, nt: i64) -> i64