code wiki / (root) / nx_ascii.nx

nx_ascii.nx

buildroot/runtime/nx_ascii.nx

4359 B127 linesdepth 3pulls 3 transitivereach 279 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_ascii.nx -- ASCII character classification. Replaces the inline `c >= 0x30 && c <= 0x39`-style checks scattered across the lexer, the printer, the formatter, the path module, the strconv module, etc. Centralises the table so all callers agree (and so we can swap to UTF-8-aware versions later without hunting them down). Functions return 1 / 0 (NishiLang doesn't have a bool type). All inputs are i64 in 0..255 -- caller pre-validates byte range (typically by reading from a *u8).

dependencies 1 imports · 10 importers

syscalls.nx nx_ascii.nx nx_ascii_kat.nx nx_coq_ingest.nx nx_hol_ingest.nx nx_isabelle_ingest.nx nx_json.nx nx_lean_ingest.nx nx_lex.nx nx_narrative_ingest.nx nx_strconv.nx nx_substrate_evolve.nx

imports: syscalls.nx

imported by: nx_ascii_kat.nxnx_coq_ingest.nxnx_hol_ingest.nxnx_isabelle_ingest.nxnx_json.nxnx_lean_ingest.nxnx_lex.nxnx_narrative_ingest.nxnx_strconv.nxnx_substrate_evolve.nx

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

main nx_ascii_is_digit nx_ascii_is_alpha nx_ascii_is_lower nx_ascii_is_upper nx_ascii_is_id_start nx_ascii_is_alpha ↻ nx_ascii_is_id_cont nx_ascii_is_alnum nx_ascii_is_alpha ↻ nx_ascii_is_digit ↻ nx_ascii_is_space nx_ascii_is_hex nx_ascii_is_digit ↻ nx_ascii_to_lower nx_ascii_is_upper ↻ nx_ascii_to_upper nx_ascii_is_lower ↻

structs

none

consts

none

functions

21func nx_ascii_is_digit(c: i64) -> i64
27func nx_ascii_is_lower(c: i64) -> i64
33func nx_ascii_is_upper(c: i64) -> i64
39func nx_ascii_is_alpha(c: i64) -> i64
44func nx_ascii_is_alnum(c: i64) -> i64
50func nx_ascii_is_id_start(c: i64) -> i64
57func nx_ascii_is_id_cont(c: i64) -> i64
called by 2: mainmain calls 1: nx_ascii_is_alnum
63func nx_ascii_is_space(c: i64) -> i64
called by 2: mainmain
73func nx_ascii_is_print(c: i64) -> i64
called by 1: main
79func nx_ascii_is_hex(c: i64) -> i64
called by 2: mainmain calls 1: nx_ascii_is_digit
87func nx_ascii_to_lower(c: i64) -> i64
called by 2: mainmain calls 1: nx_ascii_is_upper
92func nx_ascii_to_upper(c: i64) -> i64
called by 2: mainmain calls 1: nx_ascii_is_lower
99func main() -> i64