code wiki / _hdl_build / nx_tok_attr_probe.nx

nx_tok_attr_probe.nx

buildroot/runtime/_hdl_build/nx_tok_attr_probe.nx

4329 B98 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind probetopic tok
docsdependenciesstructsconstsfunctions

about

nx_tok_attr_probe.nx -- ISOLATE the attribute-text leak (task #9, 2026-07-27). Hypothesis: nx_html_next_token's attribute-skip loop does not track quote state, so a '>' INSIDE a quoted attribute value ends the tag early and the tag's remainder leaks as a TEXT token that then paints as visible content. Drives the tokenizer directly and concatenates every TEXT token; a row FAILS if the text carries attribute bytes. Control rows (C*) MUST pass, so a failing S* row is a real defect, not a broken probe.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_html_tokenizer.nx nx_tok_attr_probe.nx

imports: nx_syscalls.nxnx_html_tokenizer.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap tp_row sys_mmap ↻ tp_text sys_mmap ↻ nx_html_cursor_init nx_html_next_token _scan_name _is_name _is_void_element _lc tp_has tp_p sys_write sys_write ↻ tp_p ↻ sys_write ↻

structs

none

consts

9const K_MAGIC_4096: i64 = 4096

functions

11func tp_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: tp_rowmain calls 1: sys_write
14func tp_text(html: *u8, hlen: i64, out: *u8, cap: i64) -> i64
35func tp_has(out: *u8, n: i64, needle: *u8) -> i64
called by 1: tp_row
51func tp_row(label: *u8, html: *u8, want: *u8, bad: *u8, pp: *i64, tp: *i64) -> i64
67func main() -> i64