| 381 | |
| 382 | |
| 383 | Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { |
| 384 | struct LexState lexstate; |
| 385 | struct FuncState funcstate; |
| 386 | lexstate.buff = buff; |
| 387 | luaX_setinput(L, &lexstate, z, luaS_new(L, name)); |
| 388 | open_func(&lexstate, &funcstate); |
| 389 | funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */ |
| 390 | luaX_next(&lexstate); /* read first token */ |
| 391 | chunk(&lexstate); |
| 392 | check(&lexstate, TK_EOS); |
| 393 | close_func(&lexstate); |
| 394 | lua_assert(funcstate.prev == NULL); |
| 395 | lua_assert(funcstate.f->nups == 0); |
| 396 | lua_assert(lexstate.fs == NULL); |
| 397 | return funcstate.f; |
| 398 | } |
| 399 | |
| 400 | |
| 401 |
nothing calls this directly
no test coverage detected