all repos — min @ e04257b67c420a49c33945e2e81d19e2a6242b95

A small but practical concatenative programming language.

Fixing Nim compilation.
h3rald h3rald@h3rald.com
Sun, 04 Feb 2024 07:36:33 +0000
commit

e04257b67c420a49c33945e2e81d19e2a6242b95

parent

9fb026ca5532fa64b012f359b8955358a35902c8

2 files changed, 5 insertions(+), 3 deletions(-)

jump to
M min.nimmin.nim

@@ -76,7 +76,7 @@ result = result.concat(minFile(f, "compile", main = false))

result.add "### $# (main)" % i.filename result = result.concat(i.compileFile(main)) writeFile(nimFile, result.join("\n")) - let cmd = "nim c $#$#" % [NIMOPTIONS&" ", nimFile] + let cmd = "nim c --threadAnalysis:off $#$#" % [NIMOPTIONS&" ", nimFile] logging.notice("Calling Nim compiler:") logging.notice(cmd) discard execShellCmd(cmd)
M minpkg/core/parser.nimminpkg/core/parser.nim

@@ -826,7 +826,8 @@ while p.token != tkBracketRi:

var instructions = p.compileMinValue(i, false, indent) let v = instructions.pop result = result.concat(instructions) - result.add indent&qvar&".add "&v + if v.len > 0: + result.add indent&qvar&".add "&v eat(p, tkBracketRi) result.add op&"MinValue(kind: minQuotation, qVal: "&qvar&")" of tkSqBracketLe, tkSqBracketRi:

@@ -878,7 +879,8 @@ p.a = ""

discard getToken(p) of tkLineComment, tkBlockComment, tkLineDocComment, tkBlockDocComment, tkSpace: discard getToken(p) - result = p.compileMinValue(i, push, indent) + result = @[""] + #result = p.compileMinValue(i, push, indent) else: raiseUndefined(p, "Undefined value: '"&p.a&"'")