code wiki / (root) / parse_test.nx

parse_test.nx

buildroot/runtime/parse_test.nx

1274 B33 linesdepth 6pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic parse
docsdependenciesstructsconstsfunctions

about

parse_test.nx -- self-test for parse.nx. Walk a synthetic token stream simulating `func f() { return 42 }` and verify that parse_module runs to completion and produces one function in the module.

dependencies 4 imports · 0 importers

types.nx lex_kinds.nx ir.nx parse.nx parse_test.nx

imports: types.nxlex_kinds.nxir.nxparse.nx

imported by: nobody (leaf or entry point)

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

main tok_at tok_text_ptr parse_module prepass_register_structs peek_kind tok_at ↻ advance_tok tok_at ↻ tok_text_ptr ↻ match_kind peek_kind ↻ lookup_struct parse_die ir_type_struct_new alloc_type sys_mmap sys_mmap ↻ struct_entry_at prepass_register_aliases peek_kind ↻ advance_tok ↻ tok_text_ptr ↻ streq_n resolve_primitive_type streq_n ↻ alloc_type ↻ alloc_type_s alloc_type ↻ lookup_struct ↻ parse_die ↻ struct_entry_at ↻ prepass_register_funcs peek_kind ↻ advance_tok ↻ tok_text_ptr ↻ find_function ir_type_i64 alloc_type ↻ ir_function_new

structs

none

consts

none

functions

12func main() -> i64 {