MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaY_parser

Function luaY_parser

deps/lua/src/lparser.c:383–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381
382
383Proto *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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected