MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaY_parser

Function luaY_parser

Source/Misc/lua/src/lua.c:7959–7974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

luaX_setinputFunction · 0.85
open_funcFunction · 0.85
luaX_nextFunction · 0.85
chunkFunction · 0.85
close_funcFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected