function luaY.statement(c,Q)local k=Q.linenumber local s=Q.t.token if s=="\084\075\095\073\070"then c:ifstat(Q,k)return false elseif s=="\084\075\095\087\072\073\076\069"then c:whilestat(Q,k)return false elseif s=="\084\075\095\068\079"then luaX:next(Q)c:block(Q)c:check_match(Q,"\084\075\095\069\078\068","\084\075\095\068\079",k)return false elseif s=="\084\075\095\070\079\082"then c:forstat(Q,k)return false elseif s=="\084\075\095\082\069\080\069\065\084"then c:repeatstat(Q,k)return false elseif s=="\084\075\095\070\085\078\067\084\073\079\078"then c:funcstat(Q,k)return false elseif s=="\084\075\095\076\079\067\065\076"then luaX:next(Q)if c:testnext(Q,"\084\075\095\070\085\078\067\084\073\079\078")then c:localfunc(Q)else c:localstat(Q)end return false elseif s=="\084\075\095\082\069\084\085\082\078"then c:retstat(Q)return true elseif s=="\084\075\095\066\082\069\065\075"then luaX:next(Q)c:breakstat(Q)return true else c:exprstat(Q)return false end end
------------------------------------------------------------------------
-- initial parsing for statements, calls a lot of functions
-- * returns boolean instead of 0|1
-- * used in chunk()
------------------------------------------------------------------------
function luaY:statement(ls)
	local line = ls.linenumber -- may be needed for error messages
	local c = ls.t.token
	if c == "TK_IF" then -- stat -> ifstat
		self:ifstat(ls, line)
		return false
	elseif c == "TK_WHILE" then -- stat -> whilestat
		self:whilestat(ls, line)
		return false
	elseif c == "TK_DO" then -- stat -> DO block END
		luaX:next(ls) -- skip DO
		self:block(ls)
		self:check_match(ls, "TK_END", "TK_DO", line)
		return false
	elseif c == "TK_FOR" then -- stat -> forstat
		self:forstat(ls, line)
		return false
	elseif c == "TK_REPEAT" then -- stat -> repeatstat
		self:repeatstat(ls, line)
		return false
	elseif c == "TK_FUNCTION" then -- stat -> funcstat
		self:funcstat(ls, line)
		return false
	elseif c == "TK_LOCAL" then -- stat -> localstat
		luaX:next(ls) -- skip LOCAL
		if self:testnext(ls, "TK_FUNCTION") then -- local function?
			self:localfunc(ls)
		else
			self:localstat(ls)
		end
		return false
	elseif c == "TK_RETURN" then -- stat -> retstat
		self:retstat(ls)
		return true -- must be last statement
	elseif c == "TK_BREAK" then -- stat -> breakstat
		luaX:next(ls) -- skip BREAK
		self:breakstat(ls)
		return true -- must be last statement
	else
		self:exprstat(ls)
		return false -- to avoid warnings
	end --if c
end
