This commit is contained in:
Araq
2025-12-26 04:48:49 +01:00
parent 6535453b96
commit 98ad1f02d1
3 changed files with 6 additions and 1 deletions

View File

@@ -1501,6 +1501,7 @@ proc nextSubtree(r: var Stream; dest: var TokenBuf; tok: var PackedToken) =
elif tok.kind == ParRi:
dec nested
if nested == 0: break
type
ModuleSuffix* = distinct string
PrecompiledModule* = object
@@ -1581,6 +1582,7 @@ proc processTopLevel(c: var DecodeContext; s: var Stream; loadFullAst: bool; suf
# Parse the full statement
var buf = createTokenBuf(50)
nextSubtree(s, buf, t)
t = next(s) # skip ParRi
var cursor = cursorAt(buf, 0)
let stmtNode = loadNode(c, cursor, suffix, localSyms)
if stmtNode != nil:

View File

@@ -95,7 +95,7 @@ proc generateCode*(g: ModuleGraph; mainFileIdx: FileIndex) =
# Load system module first - it's always needed and contains essential hooks
var precompSys = PrecompiledModule(module: nil)
if g.config.m.systemFileIdx != InvalidFileIdx:
precompSys = moduleFromNifFile(g, g.config.m.systemFileIdx)
precompSys = moduleFromNifFile(g, g.config.m.systemFileIdx, loadFullAst=true)
g.systemModule = precompSys.module
# Load all modules in dependency order using stack traversal

View File

@@ -1836,6 +1836,9 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext, fromStmtList = false) =
putWithSpace(g, tkSymbol, "error")
#gcomma(g, n, c)
gsub(g, n[0], c)
of nkReplayAction:
put(g, tkSymbol, "replayaction")
#gsons(g, n, c, 0)
else:
#nkNone, nkExplicitTypeListCall:
internalError(g.config, n.info, "renderer.gsub(" & $n.kind & ')')