Implementing namespaced symbol supportImplementing namespaced symbol supportImplementing namespaced symbol supportImplementing namespaced symbol supportImplementing namespaced symbol supportImplementing namespaced symbol supportImplementing namespaced symbol supportImplementing namespaced symbol support
h3rald h3rald@h3rald.com
Sat, 25 May 2024 19:25:22 +0000
1 files changed,
10 insertions(+),
1 deletions(-)
jump to
M
minpkg/core/interpreter.nim
→
minpkg/core/interpreter.nim
@@ -195,7 +195,16 @@ return v
proc apply*(i: In, op: MinOperator, sym = "") {.effectsOf: op.} = if op.kind == minProcOp: - op.prc(i) + if not op.mdl.scope.isNil: + let origScope = i.scope + let origMdlParentScope = op.mdl.scope.parent + i.scope = op.mdl.scope + i.scope.parent = origScope + op.prc(i) + i.scope.parent = origMdlParentScope + i.scope = origScope + else: + op.prc(i) else: if op.val.kind == minQuotation: var newscope = newScopeRef(i.scope)