function luaY.funcargs(h,p,y)local X=p.fs local K={}local N local U=p.linenumber local V=p.t.token if V=="\040"then if U~=p.lastline then luaX:syntaxerror(p,"\097\109\098\105\103\117\111\117\115 \115\121\110\116\097\120 \040\102\117\110\099\116\105\111\110 \099\097\108\108 \120 \110\101\119 \115\116\097\116\101\109\101\110\116\041")end luaX:next(p)if p.t.token=="\041"then K.k="\086\086\079\073\068"else h:explist1(p,K)luaK:setmultret(X,K)end h:check_match(p,"\041","\040",U)elseif V=="\123"then h:constructor(p,K)elseif V=="\084\075\095\083\084\082\073\078\071"then h:codestring(p,K,p.t.seminfo)luaX:next(p)else luaX:syntaxerror(p,"\102\117\110\099\116\105\111\110 \097\114\103\117\109\101\110\116\115 \101\120\112\101\099\116\101\100")return end assert(y.k=="\086\078\079\078\082\069\076\079\067")local d=y.info if h:hasmultret(K.k)then N=h.LUA_MULTRET else if K.k~="\086\086\079\073\068"then luaK:exp2nextreg(X,K)end N=X.freereg-(d+1)end h:init_exp(y,"\086\067\065\076\076",luaK:codeABC(X,"\079\080\095\067\065\076\076",d,N+1,2))luaK:fixline(X,U)X.freereg=d+1 end

function luaY:funcargs(ls, f)
  local fs = ls.fs
  local args = {}  -- expdesc
  local nparams
  local line = ls.linenumber
  local c = ls.t.token
  if c == "(" then  -- funcargs -> '(' [ explist1 ] ')'
    if line ~= ls.lastline then
      luaX:syntaxerror(ls, "ambiguous syntax (function call x new statement)")
    end
    luaX:next(ls)
    if ls.t.token == ")" then  -- arg list is empty?
      args.k = "VVOID"
    else
      self:explist1(ls, args)
      luaK:setmultret(fs, args)
    end
    self:check_match(ls, ")", "(", line)
  elseif c == "{" then  -- funcargs -> constructor
    self:constructor(ls, args)
  elseif c == "TK_STRING" then  -- funcargs -> STRING
    self:codestring(ls, args, ls.t.seminfo)
    luaX:next(ls)  -- must use 'seminfo' before 'next'
  else
    luaX:syntaxerror(ls, "function arguments expected")
    return
  end
  assert(f.k == "VNONRELOC")
  local base = f.info  -- base register for call
  if self:hasmultret(args.k) then
    nparams = self.LUA_MULTRET  -- open call
  else
    if args.k ~= "VVOID" then
      luaK:exp2nextreg(fs, args)  -- close last argument
    end
    nparams = fs.freereg - (base + 1)
  end
  self:init_exp(f, "VCALL", luaK:codeABC(fs, "OP_CALL", base, nparams + 1, 2))
  luaK:fixline(fs, line)
  fs.freereg = base + 1  -- call remove function and arguments and leaves
                         -- (unless changed) one result
end
