@@ -199,10 +199,17 @@ proc initCodeGenLegacy*(script: Script, module: Module, chunk: Chunk,
199199
200200proc clone (gen: CodeGen , kind: GenKind ): CodeGen =
201201 # Clone a code generator, using a different kind for the new one.
202- result = CodeGen (script: gen.script, module: gen.module, chunk: gen.chunk,
203- scopes: gen.scopes, flowBlocks: gen.flowBlocks,
204- ctxAllocator: gen.ctxAllocator, context: gen.context,
205- kind: kind)
202+ result = CodeGen (
203+ script: gen.script, module: gen.module, chunk: gen.chunk,
204+ scopes: gen.scopes, flowBlocks: gen.flowBlocks,
205+ ctxAllocator: gen.ctxAllocator, context: gen.context,
206+ includeBasePath: gen.includeBasePath,
207+ resolver: gen.resolver, manager: gen.manager, pkgr: gen.pkgr,
208+ parserCallback: gen.parserCallback, stdlibs: gen.stdlibs,
209+ policy: gen.policy, counter: gen.counter,
210+ triggerFromPath: gen.triggerFromPath,
211+ allowExprResult: gen.allowExprResult,
212+ kind: kind)
206213
207214template genGuard (body) =
208215 # Wraps ``body`` in a "guard" used for code generation. The guard sets the
0 commit comments