ww: implement package initialization

This commit is contained in:
2026-08-14 19:02:35 +09:00
parent 72e890d5aa
commit c6bec0914d
24 changed files with 5279 additions and 1009 deletions

View File

@@ -113,7 +113,7 @@ export fn main(argc: i32, argv: **u8) i32 = {
view.ptr = src;
view.len = nlen: i32;
let fname: str = strings.dup(view);
init(&s, fname, buf, blen);
parserinit(&s, fname, buf, blen);
if (parse(&s) != 0) { return 1; };
if (encode(&s) != 0) { return 1; };

View File

@@ -136,7 +136,7 @@ fn reglookup(p: *u8, n: u64) i32 = {
return D_NONE;
};
export fn init(a: *asm_, file: str, src: *u8, len: u64) void = {
export fn parserinit(a: *asm_, file: str, src: *u8, len: u64) void = {
a.file = file;
a.src = src;
a.srclen = len;