Fixed compilation.
h3rald h3rald@h3rald.com
Tue, 18 Jun 2024 13:34:20 +0200
3 files changed,
8 insertions(+),
3 deletions(-)
M
minpkg/core/interpreter.nim
→
minpkg/core/interpreter.nim
@@ -396,6 +396,8 @@ if files.len > 0 or (ASSETPATH != ""):
result.add "import critbits" if ASSETPATH != "": result.add "import base64" + result.add "import logging" + result.add "logging.setLogFilter(logging.lvlNotice)" result.add "MINCOMPILED = true" result.add "var i = newMinInterpreter(\"$#\")" % i.filename result.add "i.stdLib()"@@ -466,7 +468,6 @@ for key, value in i2.scope.symbols.pairs:
var v = value if v.kind == minProcOp: v.mdl = result - #result.scope.setSymbol(key, v) result.scope.symbols[key] = v CACHEDMODULES[s] = result
M
minpkg/core/parser.nim
→
minpkg/core/parser.nim
@@ -111,10 +111,10 @@ minValOp
MinOperator* = object sealed*: bool doc*: JsonNode + mdl*: MinValue # Only set in case of modules case kind*: MinOperatorKind of minProcOp: prc*: MinOperatorProc - mdl*: MinValue # Only set in case of modules of minValOp: quotation*: bool val*: MinValue
M
minpkg/lib/min_global.nim
→
minpkg/lib/min_global.nim
@@ -162,7 +162,11 @@ CACHEDMODULES[f] = newDict(i2.scope)
CACHEDMODULES[f].objType = "module" mdl = CACHEDMODULES[f] for key, value in i2.scope.symbols.pairs: - mdl.scope.setSymbol(key, value, false, false) + # We need to set the mdl field of minOperators + # In case of modules, or internal calls will not work + var v = value + v.mdl = mdl + mdl.scope.symbols[key] = v i.push(mdl) else: if not f.fileExists: