Skip to content

Commit 4d36079

Browse files
committed
cleanup
1 parent 4e647a3 commit 4d36079

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

script/files.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,6 @@ function m.compileState(uri, text)
565565

566566
local file = m.fileMap[uri]
567567
if LAZY and not file.trusted then
568-
state.pushError = nil
569568
local cache = m.getLazyCache()
570569
local id = ('%d'):format(file.id)
571570
clock = os.clock()

script/parser/compile.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3856,8 +3856,6 @@ local function initState(lua, version, options)
38563856
errs[#errs+1] = err
38573857
return err
38583858
end
3859-
3860-
state.pushError = pushError
38613859
end
38623860

38633861
return function (lua, mode, version, options)

script/parser/luadoc.lua

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,8 +1958,19 @@ return function (state)
19581958
}
19591959

19601960
pushWarning = function (err)
1961+
local errs = state.errs
1962+
if err.finish < err.start then
1963+
err.finish = err.start
1964+
end
1965+
local last = errs[#errs]
1966+
if last then
1967+
if last.start <= err.start and last.finish >= err.finish then
1968+
return
1969+
end
1970+
end
19611971
err.level = err.level or 'Warning'
1962-
state.pushError(err)
1972+
errs[#errs+1] = err
1973+
return err
19631974
end
19641975
Lines = state.lines
19651976

0 commit comments

Comments
 (0)