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

Function cond

deps/lua/src/lparser.c:965–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963
964
965static int cond (LexState *ls) {
966 /* cond -> exp */
967 expdesc v;
968 expr(ls, &v); /* read condition */
969 if (v.k == VNIL) v.k = VFALSE; /* `falses' are all equal here */
970 luaK_goiftrue(ls->fs, &v);
971 return v.f;
972}
973
974
975static void breakstat (LexState *ls) {

Callers 3

whilestatFunction · 0.85
repeatstatFunction · 0.85
test_then_blockFunction · 0.85

Calls 2

exprFunction · 0.85
luaK_goiftrueFunction · 0.85

Tested by 1

test_then_blockFunction · 0.68