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

Function recfield

third-party/lua-5.5.0/src/lparser.c:936–952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

934
935
936static void recfield (LexState *ls, ConsControl *cc) {
937 /* recfield -> (NAME | '['exp']') = exp */
938 FuncState *fs = ls->fs;
939 lu_byte reg = ls->fs->freereg;
940 expdesc tab, key, val;
941 if (ls->t.token == TK_NAME)
942 codename(ls, &key);
943 else /* ls->t.token == '[' */
944 yindex(ls, &key);
945 cc->nh++;
946 checknext(ls, '=');
947 tab = *cc->t;
948 luaK_indexed(fs, &tab, &key);
949 expr(ls, &val);
950 luaK_storevar(fs, &tab, &val);
951 fs->freereg = reg; /* free registers */
952}
953
954
955static void closelistfield (FuncState *fs, ConsControl *cc) {

Callers 1

fieldFunction · 0.70

Calls 6

codenameFunction · 0.70
yindexFunction · 0.70
checknextFunction · 0.70
luaK_indexedFunction · 0.70
exprFunction · 0.70
luaK_storevarFunction · 0.70

Tested by

no test coverage detected