all repos — min @ 37124ae3fe967ae4a2681c3f1cb6c33fb1c2c8dd

A small but practical concatenative programming language.

Fixes.
h3rald h3rald@h3rald.com
Sun, 16 Jun 2024 17:11:40 +0200
commit

37124ae3fe967ae4a2681c3f1cb6c33fb1c2c8dd

parent

bb44494bf64ae8b1b925a24afa213ef50bf94fe7

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M minpkg/core/interpreter.nimminpkg/core/interpreter.nim

@@ -198,9 +198,12 @@ if op.kind == minProcOp:

if not op.mdl.isNil and not op.mdl.scope.isNil: # Capture closures at module level let origScope = i.scope + let origParentScope = i.scope.parent i.scope = op.mdl.scope + i.scope.parent = origScope op.prc(i) i.scope = origScope + i.scope.parent = origParentScope else: op.prc(i) else:
M minpkg/core/scope.nimminpkg/core/scope.nim

@@ -53,10 +53,10 @@ string]): bool

proc hasSymbol*(scope: ref MinScope, key: string): bool = debug "hasSymbol: $#" % [key] - if scope.isNil: return false else: + debug "hasSymbol - scope symbols: $#" % [$scope.symbols.keys.toSeq] if scope.symbols.hasKey(key): debug "hasSymbol - found $#" % [key] return true