| 7957 | |
| 7958 | |
| 7959 | Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { |
| 7960 | struct LexState lexstate; |
| 7961 | struct FuncState funcstate; |
| 7962 | lexstate.buff = buff; |
| 7963 | luaX_setinput(L, &lexstate, z, luaS_new(L, name)); |
| 7964 | open_func(&lexstate, &funcstate); |
| 7965 | funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */ |
| 7966 | luaX_next(&lexstate); /* read first token */ |
| 7967 | chunk(&lexstate); |
| 7968 | check(&lexstate, TK_EOS); |
| 7969 | close_func(&lexstate); |
| 7970 | lua_assert(funcstate.prev == NULL); |
| 7971 | lua_assert(funcstate.f->nups == 0); |
| 7972 | lua_assert(lexstate.fs == NULL); |
| 7973 | return funcstate.f; |
| 7974 | } |
| 7975 | |
| 7976 | |
| 7977 |
nothing calls this directly
no test coverage detected