all repos — min @ c78094f69b44d0deb6d8b1b800fdd45e380054e8

A small but practical concatenative programming language.

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
commit

c78094f69b44d0deb6d8b1b800fdd45e380054e8

parent

d9cc6bedab9a454ca1b4cf5fd0a3d54b3ec5af88

1 files changed, 10 insertions(+), 1 deletions(-)

jump to
M minpkg/core/interpreter.nimminpkg/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)