fix: String_IsNull/String_Offset helpers + remove pointer-to-int casts

- Add String_IsNull and String_Offset wrappers in lib/String.bux
- Add bux_str_is_null and bux_str_offset runtime functions in rt/runtime.c
- Update String_Replace to use String_IsNull instead of String_Len(pos)==0
- Replace pointer-to-uint casts (as uint == 0, pointer arithmetic) across apps/
- Parser newline skipping fixes in src/parser.bux
This commit is contained in:
2026-06-08 20:23:30 +03:00
parent 3c7938163c
commit 7d1d722cba
7 changed files with 61 additions and 34 deletions
+6
View File
@@ -920,6 +920,12 @@ func parserParseParamList(p: *Parser) -> *Decl {
discard parserExpect(p, tkLParen, "expected '('");
while !parserCheck(p, tkRParen) && parserPeek(p, 0) != tkEndOfFile {
while parserCheck(p, tkNewLine) || parserCheck(p, tkSemicolon) {
discard parserAdvance(p);
}
if parserCheck(p, tkRParen) || parserPeek(p, 0) == tkEndOfFile {
break;
}
if d.paramCount >= 9 { break; }
let nameTok: LexToken = parserExpectIdentOrKeyword(p, "expected parameter name");
discard parserExpect(p, tkColon, "expected ':' in parameter");