Compatibility with Lua 5.1 ... again.
This commit is contained in:
parent
f2f661cc73
commit
48d939916c
@ -34,7 +34,8 @@
|
|||||||
(each [_ {: message : range} (ipairs file.diagnostics)]
|
(each [_ {: message : range} (ipairs file.diagnostics)]
|
||||||
(set should-err? true)
|
(set should-err? true)
|
||||||
(print-diagnostic filename message range))))
|
(print-diagnostic filename message range))))
|
||||||
(os.exit (not should-err?))))
|
(when should-err?
|
||||||
|
(os.exit 1))))
|
||||||
|
|
||||||
(λ main-loop [in out]
|
(λ main-loop [in out]
|
||||||
(local send (partial json-rpc.write out))
|
(local send (partial json-rpc.write out))
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
(λ load-library [name]
|
(λ load-library [name]
|
||||||
(let [path (.. data-dir name docset-ext)]
|
(let [path (.. data-dir name docset-ext)]
|
||||||
(case (io.open path)
|
(case (io.open path)
|
||||||
f (let [docs (fennel.load-code (f:read :a) {})]
|
f (let [docs (fennel.load-code (f:read :*all) {})]
|
||||||
(f:close)
|
(f:close)
|
||||||
(docs))
|
(docs))
|
||||||
_ {:status :not-found
|
_ {:status :not-found
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user