code wiki / _hdl_build / nx_funchead_lib.nx

nx_funchead_lib.nx

buildroot/runtime/_hdl_build/nx_funchead_lib.nx

2727 B54 linesdepth 0pulls 0 transitivereach 24 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_funchead_lib.nx -- THE ONE FUNCTION-HEAD SCANNER (search E1b, 2026-09-14): where a NishiLang source declares a function, `func NAME(` at the beginning of a line, as a library so nx_funcmine (the OO dedup miner) and nx_corpus_ingest (definition anchors, the term a file carries only when it DEFINES a symbol) read the SAME heads. Two scanners would agree the day they were written and drift on the next edit; this is the miner's own loop lifted out of its main, byte-for-byte in behaviour (nx_behaveprobe IDENTICAL is the proof), with its identifier alphabet (fh_isid) beside it. license_tier: ORIGINAL

dependencies 0 imports · 2 importers

nx_funchead_lib.nx nx_corpus_ingest.nx nx_funcmine.nx

imports: none

imported by: nx_corpus_ingest.nxnx_funcmine.nx

structs

none

consts

7const FH_LOWER_A: i64 = 97
8const FH_LOWER_Z: i64 = 122
9const FH_UPPER_A: i64 = 65
10const FH_UPPER_Z: i64 = 90
11const FH_DIG_0: i64 = 48
12const FH_DIG_9: i64 = 57
13const FH_UNDERSCORE: i64 = 95
14const FH_LPAREN: i64 = 40
15const FH_LF: i64 = 10
16const FH_KW: *u8 = "func " // the head keyword with its one space; the name begins right after it

functions

18func fh_isid(c: i64) -> i64
called by 1: fh_scan
25func fh_kwlen() -> i64 { let kw: *u8 = FH_KW; var n: i64 = 0; while kw[n] != (0 as u8) { n = n + 1 } return n }
called by 1: fh_scan
30func fh_scan(src: *u8, n: i64, starts: *i64, noffs: *i64, nlens: *i64, cap: i64) -> i64
called by 2: ci_def_anchorsmain calls 2: fh_kwlenfh_isid