| 412 | |
| 413 | |
| 414 | Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { |
| 415 | struct LexState lexstate; |
| 416 | struct FuncState funcstate; |
| 417 | lexstate.buff = buff; |
| 418 | luaX_setinput(L, &lexstate, z, luaS_new(L, name)); |
| 419 | open_func(&lexstate, &funcstate); |
| 420 | funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */ |
| 421 | luaX_next(&lexstate); /* read first token */ |
| 422 | chunk(&lexstate); |
| 423 | check(&lexstate, TK_EOS); |
| 424 | close_func(&lexstate); |
| 425 | lua_assert(funcstate.prev == NULL); |
| 426 | lua_assert(funcstate.f->nups == 0); |
| 427 | lua_assert(lexstate.fs == NULL); |
| 428 | return funcstate.f; |
| 429 | } |
| 430 | |
| 431 | |
| 432 |
nothing calls this directly
no test coverage detected