function luaY.whilestat(j,g,V)local O=g.fs local f={}luaX:next(g)local n=luaK:getlabel(O)local c=j:cond(g)j:enterblock(O,f,true)j:checknext(g,"\084\075\095\068\079")j:block(g)luaK:patchlist(O,luaK:jump(O),n)j:check_match(g,"\084\075\095\069\078\068","\084\075\095\087\072\073\076\069",V)j:leaveblock(O)luaK:patchtohere(O,c)end
------------------------------------------------------------------------
-- parse a while-do control structure, body processed by block()
-- * with dynamic array sizes, MAXEXPWHILE + EXTRAEXP limits imposed by
--   the function's implementation can be removed
-- * used in statements()
------------------------------------------------------------------------
function luaY:whilestat(ls, line)
	-- whilestat -> WHILE cond DO block END
	local fs = ls.fs
	local bl = {} -- BlockCnt
	luaX:next(ls) -- skip WHILE
	local whileinit = luaK:getlabel(fs)
	local condexit = self:cond(ls)
	self:enterblock(fs, bl, true)
	self:checknext(ls, "TK_DO")
	self:block(ls)
	luaK:patchlist(fs, luaK:jump(fs), whileinit)
	self:check_match(ls, "TK_END", "TK_WHILE", line)
	self:leaveblock(fs)
	luaK:patchtohere(fs, condexit) -- false conditions finish the loop
end
