Compatibility with Lua 5.1 ... again.

This commit is contained in:
Phil Hagelberg 2025-03-04 08:58:59 -08:00
parent f2f661cc73
commit 48d939916c
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,8 @@
(each [_ {: message : range} (ipairs file.diagnostics)]
(set should-err? true)
(print-diagnostic filename message range))))
(os.exit (not should-err?))))
(when should-err?
(os.exit 1))))
(λ main-loop [in out]
(local send (partial json-rpc.write out))

View File

@ -56,7 +56,7 @@
(λ load-library [name]
(let [path (.. data-dir name docset-ext)]
(case (io.open path)
f (let [docs (fennel.load-code (f:read :a) {})]
f (let [docs (fennel.load-code (f:read :*all) {})]
(f:close)
(docs))
_ {:status :not-found