MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / f_parser

Function f_parser

libraries/AP_Scripting/lua/src/ldo.c:775–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773
774
775static void f_parser (lua_State *L, void *ud) {
776 LClosure *cl;
777 struct SParser *p = cast(struct SParser *, ud);
778 int c = zgetc(p->z); /* read first character */
779#if LUA_SUPPORT_LOAD_BINARY
780 // support loading pre-compiled luac
781 if (c == LUA_SIGNATURE[0]) {
782 checkmode(L, p->mode, "binary");
783 cl = luaU_undump(L, p->z, p->name);
784 }
785 else
786#endif
787 {
788 checkmode(L, p->mode, "text");
789 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
790 }
791 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
792 luaF_initupvals(L, cl);
793}
794
795
796int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 4

checkmodeFunction · 0.85
luaU_undumpFunction · 0.85
luaY_parserFunction · 0.85
luaF_initupvalsFunction · 0.85

Tested by

no test coverage detected