function luaY.forstat(Z,M,N)local L=M.fs local m={}Z:enterblock(L,m,true)luaX:next(M)local E=Z:str_checkname(M)local q=M.t.token if q=="\061"then Z:fornum(M,E,N)elseif q=="\044"or q=="\084\075\095\073\078"then Z:forlist(M,E)else luaX:syntaxerror(M,Z:LUA_QL("\061")..(" \111\114 "..(Z:LUA_QL("\105\110").." \101\120\112\101\099\116\101\100")))end Z:check_match(M,"\084\075\095\069\078\068","\084\075\095\070\079\082",N)Z:leaveblock(L)end

function luaY:forstat(ls, line)
  -- forstat -> FOR (fornum | forlist) END
  local fs = ls.fs
  local bl = {}  -- BlockCnt
  self:enterblock(fs, bl, true)  -- scope for loop and control variables
  luaX:next(ls)  -- skip `for'
  local varname = self:str_checkname(ls)  -- first variable name
  local c = ls.t.token
  if c == "=" then
    self:fornum(ls, varname, line)
  elseif c == "," or c == "TK_IN" then
    self:forlist(ls, varname)
  else
    luaX:syntaxerror(ls, self:LUA_QL("=").." or "..self:LUA_QL("in").." expected")
  end
  self:check_match(ls, "TK_END", "TK_FOR", line)
  self:leaveblock(fs)  -- loop scope (`break' jumps to this point)
end
