This commit is contained in:
leaf corcoran 2014-06-17 17:40:24 -07:00
parent 6d5dbf7237
commit 5c44d98775
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ local lookup_line
lookup_line = function(fname, pos, cache)
if not cache[fname] then
do
local _with_0 = io.open(fname)
local _with_0 = assert(io.open(fname))
cache[fname] = _with_0:read("*a")
_with_0:close()
end

View File

@ -12,7 +12,7 @@ user_error = (...) ->
-- find the line number of `pos` chars into fname
lookup_line = (fname, pos, cache) ->
if not cache[fname]
with io.open fname
with assert io.open(fname)
cache[fname] = \read "*a"
\close!
pos_to_line cache[fname], pos