Phase 7.9: multi-file build, module braces, struct init multi-line, else-if fix

This commit is contained in:
2026-05-31 14:25:57 +03:00
parent f4de065160
commit de6e89e3df
33 changed files with 3870 additions and 326 deletions
+4
View File
@@ -516,6 +516,8 @@ proc parsePostfix(p: var Parser): Expr =
discard p.advance()
var fields: seq[tuple[name: string, value: Expr]] = @[]
while not p.check(tkRBrace) and not p.isAtEnd:
while p.check(tkNewLine): discard p.advance()
if p.check(tkRBrace) or p.isAtEnd: break
let fieldName = p.expect(tkIdent, "expected field name").text
discard p.expect(tkColon, "expected ':'")
let fieldValue = p.parseExpr()
@@ -737,9 +739,11 @@ proc parseStmt(p: var Parser): Stmt =
let thenBlk = p.parseBlock()
var elseIfs: seq[ElseIf] = @[]
var elseBlk: Block = nil
while p.check(tkNewLine): discard p.advance()
while p.check(tkElse):
let elseLoc = p.currentLoc
discard p.advance()
while p.check(tkNewLine): discard p.advance()
if p.check(tkIf):
discard p.advance()
let elifCond = p.parseExpr()