Skip to content

Commit 18e1fd5

Browse files
committed
fix clone
Signed-off-by: George Lemon <georgelemon@protonmail.com>
1 parent da80a65 commit 18e1fd5

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

src/vancode/interpreter/codegen.nim

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,17 @@ proc initCodeGenLegacy*(script: Script, module: Module, chunk: Chunk,
199199

200200
proc 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

207214
template genGuard(body) =
208215
# Wraps ``body`` in a "guard" used for code generation. The guard sets the

0 commit comments

Comments
 (0)