code wiki / (root) / nx_layout_from_dom_test.nx

nx_layout_from_dom_test.nx

buildroot/runtime/nx_layout_from_dom_test.nx

6582 B141 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic layout
docsdependenciesstructsconstsfunctions

about

nx_layout_from_dom_test.nx -- end-to-end smoke proving HTML token stream produces a correct LayoutBox tree. Fixture: "<body><h1>Hi</h1><p>Yo</p></body>" Expected token stream from nx_html_next_token: START_TAG body / START_TAG h1 / TEXT "Hi" / END_TAG h1 / START_TAG p / TEXT "Yo" / END_TAG p / END_TAG body / EOF Expected LayoutBox tree (6 boxes total): box 0: synthetic root (BLOCK, source=-1) box 1: body (BLOCK, parent=0) box 2: h1 (BLOCK, parent=1) box 3: text "Hi" (TEXT, parent=2) box 4: p (BLOCK, parent=1) box 5: text "Yo" (TEXT, parent=4)

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_html_tokenizer.nx nx_layout_box.nx nx_layout_default_display.nx nx_layout_from_dom.nx nx_layout_from_dom_test.nx

imports: nx_syscalls.nxnx_html_tokenizer.nxnx_layout_box.nxnx_layout_default_display.nxnx_layout_from_dom.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 _put_byte nx_layout_tree_init nx_layout_from_dom_stack_i nx_layout_from_dom nx_layout_box_append _layout_box_at _lfd_push sys_mmap ↻ nx_html_cursor_init nx_html_next_token _scan_name _is_name _is_void_element _lc _lfd_is_chrome_start _lfd_chrome_tag _lfd_has_role_nav _lfd_name_eq _lfd_lc _lfd_has_chrome_class _lfd_src_has_sub _lfd_inline_hidden _lfd_src_has_sub ↻ nx_layout_default_display _disp_eq1 _disp_lc _disp_is_h_family _disp_lc ↻ _disp_eq2 _disp_lc ↻ _disp_eq3 _disp_lc ↻ _disp_eq4 _disp_lc ↻ _disp_eq5 _disp_lc ↻ _disp_eq6 _disp_lc ↻

structs

none

consts

none

functions

24func _put_byte(buf: *u8, i: i64, v: i64) -> i64
called by 1: main
29func main() -> i64