MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaY_parser

Function luaY_parser

lua/lparser.c:414–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413
414Proto *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

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