Skip to content

Commit

Permalink
using a better name to the variable tha represents the farthest position
Browse files Browse the repository at this point in the history
  • Loading branch information
andremm committed Oct 26, 2019
1 parent 4ad5660 commit da0050c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua-parser/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ local syntaxerror = validator.syntaxerror
function parser.parse (subject, filename)
local errorinfo = { subject = subject, filename = filename }
lpeg.setmaxstack(1000)
local ast, label, sfail = lpeg.match(G, subject, nil, errorinfo)
local ast, label, errorpos = lpeg.match(G, subject, nil, errorinfo)
if not ast then
local errmsg = labels[label][2]
return ast, syntaxerror(errorinfo, sfail, errmsg)
return ast, syntaxerror(errorinfo, errorpos, errmsg)
end
return validate(ast, errorinfo)
end
Expand Down

0 comments on commit da0050c

Please sign in to comment.