fix: general equality (=) for all types, add type predicates & collection fns, test suite docs

- Fix: = now uses cljEqual/cljMultiEqual instead of numeric-only cljNumEq,
  so (= :a :a), (= "a" "a"), (= [1 2] [1 2]), (= nil nil) etc return true
- Fix: ns forms inside unwrapped (do ...) are skipped instead of emitting
  broken Nim comments inside cljRepr()
- Fix: defmacro forms go to defs section, not wrapped in discard cljRepr()
- Add 18 type predicates: keyword?, symbol?, string?, number?, integer?,
  float?, vector?, map?, set?, list?, seq?, coll?, sequential?, fn?,
  boolean?, true?, false?, some?
- Add collection fns: second, ffirst, nfirst, peek, pop
- Add keyword/symbol ops: keyword, symbol, name, namespace, key, val
- Update eval interpreter = to handle structural collection equality
- Add test_single.py + test_vals.clj for Clojure test suite runner
- Add docs/en/07 and docs/bg/07 for cross-dialect test suite compatibility
- Update README with test suite documentation link
This commit is contained in:
2026-05-09 12:17:10 +03:00
parent ba0b300917
commit a9ad83c509
12 changed files with 777 additions and 83 deletions
+5 -5
View File
@@ -159,7 +159,7 @@ proc runFile*(inputPath: string) =
let aiRes = ai_assist.explainError(compileOut, source, inputPath)
stderr.writeLine(ai_assist.formatSuggestion(aiRes))
quit(1)
try: removeDir(buildDir) except: discard
# try: removeDir(buildDir) except: discard
let runResult = execCmd(cacheBinPath)
quit(runResult)
@@ -173,7 +173,7 @@ proc runFile*(inputPath: string) =
let source = readFile(inputPath)
let aiRes = ai_assist.explainError(compileOut, source, inputPath)
stderr.writeLine(ai_assist.formatSuggestion(aiRes))
try: removeDir(buildDir) except: discard
# try: removeDir(buildDir) except: discard
quit(1)
# Save to cache
@@ -186,7 +186,7 @@ proc runFile*(inputPath: string) =
discard
let runResult = execCmd(binPath)
try: removeDir(buildDir) except: discard
# try: removeDir(buildDir) except: discard
if runResult != 0:
stderr.writeLine("Execution failed")
quit(1)
@@ -241,10 +241,10 @@ proc main() =
if ai_assist.hasAiConfig():
let aiRes = ai_assist.explainError(compileOut, code, "-e expression")
stderr.writeLine(ai_assist.formatSuggestion(aiRes))
try: removeDir(buildDir) except: discard
# try: removeDir(buildDir) except: discard
quit(1)
let runResult = execCmd(binPath)
try: removeDir(buildDir) except: discard
# try: removeDir(buildDir) except: discard
quit(runResult)
case cmd