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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user