MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / f_parser

Function f_parser

third-party/lua-5.5.0/src/ldo.c:1123–1142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1121
1122
1123static void f_parser (lua_State *L, void *ud) {
1124 LClosure *cl;
1125 struct SParser *p = cast(struct SParser *, ud);
1126 const char *mode = p->mode ? p->mode : "bt";
1127 int c = zgetc(p->z); /* read first character */
1128 if (c == LUA_SIGNATURE[0]) {
1129 int fixed = 0;
1130 if (strchr(mode, 'B') != NULL)
1131 fixed = 1;
1132 else
1133 checkmode(L, mode, "binary");
1134 cl = luaU_undump(L, p->z, p->name, fixed);
1135 }
1136 else {
1137 checkmode(L, mode, "text");
1138 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
1139 }
1140 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
1141 luaF_initupvals(L, cl);
1142}
1143
1144
1145TStatus luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 4

checkmodeFunction · 0.70
luaU_undumpFunction · 0.70
luaY_parserFunction · 0.70
luaF_initupvalsFunction · 0.70

Tested by

no test coverage detected