all repos — min @ dba628cbfded94e7d84ae6aff7d4acb0919bfe73

A small but practical concatenative programming language.

Fixes.
h3rald h3rald@h3rald.com
Wed, 23 Dec 2020 18:43:06 +0100
commit

dba628cbfded94e7d84ae6aff7d4acb0919bfe73

parent

8876e02c1389e598033a11722624798e99c8d3cb

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

jump to
M lib/min_dstore.nimlib/min_dstore.nim

@@ -118,10 +118,9 @@ raiseInvalid("collection/id not specified")

let id = parts[1] var data = i.dget(ds, "data".newVal) if not dhas(data, collection): - raiseInvalid("Collection '$#' does not exist" % collection) + i.dset(data, collection, newDict(i.scope)) var cll = i.dget(data, collection) i.dset(cll, id, d) - #i.dset(ds, "data", data) i.push ds def.symbol("dsdelete") do (i: In):
M lib/min_lang.nimlib/min_lang.nim

@@ -88,7 +88,13 @@ if not file.endsWith(".min"):

file = file & ".min" info("[load] File: ", file) if MINCOMPILED: - var compiledFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var normalizedFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var compiledFile = normalizedFile + var normalizedCurrFile = strutils.replace(strutils.replace(i.filename, "\\", "/"), "./", "") + var parts = normalizedCurrFile.split("/") + if parts.len > 1: + discard parts.pop + compiledFile = parts.join("/") & "/" & normalizedFile if COMPILEDMINFILES.hasKey(compiledFile): COMPILEDMINFILES[compiledFile](i) return

@@ -105,7 +111,14 @@ if not file.endsWith(".min"):

file = file & ".min" info("[require] File: ", file) if MINCOMPILED: - var compiledFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var normalizedFile = strutils.replace(strutils.replace(file, "\\", "/"), "./", "") + var compiledFile = normalizedFile + var normalizedCurrFile = strutils.replace(strutils.replace(i.filename, "\\", "/"), "./", "") + var parts = normalizedCurrFile.split("/") + if parts.len > 1: + discard parts.pop + compiledFile = parts.join("/") & "/" & normalizedFile + echo compiledFile, " - ", normalizedFile, " - ", i.filename, " - ", normalizedCurrFile if COMPILEDMINFILES.hasKey(compiledFile): var i2 = i.copy(file) COMPILEDMINFILES[compiledFile](i2)