Fixing Nim compilation.
h3rald h3rald@h3rald.com
Sun, 04 Feb 2024 07:36:33 +0000
2 files changed,
5 insertions(+),
3 deletions(-)
M
min.nim
→
min.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.nim
→
minpkg/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&"'")