Fix popping subsyntaxes that end consecutively (#1246)
This commit is contained in:
parent
8603644726
commit
271a804986
|
@ -283,13 +283,15 @@ function tokenizer.tokenize(incoming_syntax, text, state)
|
|||
-- General end of syntax check. Applies in the case where
|
||||
-- we're ending early in the middle of a delimiter, or
|
||||
-- just normally, upon finding a token.
|
||||
if subsyntax_info then
|
||||
while subsyntax_info do
|
||||
local s, e = find_text(text, subsyntax_info, i, true, true)
|
||||
if s then
|
||||
push_token(res, subsyntax_info.type, text:usub(i, e))
|
||||
-- On finding unescaped delimiter, pop it.
|
||||
pop_subsyntax()
|
||||
i = e + 1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue