fix: selfhost CLI run command, lexer char literal, parser test path, calloc in runtime
- Fix lexer unterminated char error test (was treating 'a as lifetime) - Fix parser test sample.bux path for root-dir execution - Add bux_system() to runtime.c and run command to selfhost CLI - Switch bux_alloc from malloc to calloc for zero-init - Fix module flattening in Cli_Check/Cli_Compile to scan full decl list - Make test passes fully, selfhost builds successfully
This commit is contained in:
@@ -553,6 +553,8 @@ proc nextToken(lex: var Lexer): Token =
|
||||
# Simple heuristic: if peek(2) is ', it's a char literal; else lifetime
|
||||
if lex.peek(2) == '\'':
|
||||
return lex.scanChar(startLoc, 0)
|
||||
elif lex.peek(2) == '\0':
|
||||
return lex.scanChar(startLoc, 0)
|
||||
else:
|
||||
# Lifetime: consume ' and then identifier chars
|
||||
discard lex.advance() # '
|
||||
|
||||
Reference in New Issue
Block a user