Skip to content

Commit 69502d7

Browse files
committed
copy additional codegen fields to procGen inside genMacro
Signed-off-by: George Lemon <georgelemon@protonmail.com>
1 parent 6802e7f commit 69502d7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/tim/engine/transformers.nim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,14 @@ block extendvancodeAstAndCodeGen:
426426
if gen.kind == gkToplevel: nil
427427
else: gen.ctxAllocator
428428
)
429+
430+
# pass down some context from the parent codegen to the proc codegen so it can
431+
procGen.includeBasePath = gen.includeBasePath
432+
procGen.parserCallback = gen.parserCallback
433+
procGen.resolver = gen.resolver
434+
procGen.pkgr = gen.pkgr
435+
procGen.stdlibs = gen.stdlibs
436+
429437
theProc.chunk = chunk
430438
chunk.file = gen.chunk.file
431439
procGen.procReturnTy = returnTy

0 commit comments

Comments
 (0)