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

Function cond

lua/lparser.c:1025–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1023
1024
1025static int cond (LexState *ls) {
1026 /* cond -> exp */
1027 expdesc v;
1028 expr(ls, &v); /* read condition */
1029 if (v.k == VNIL) v.k = VFALSE; /* `falses' are all equal here */
1030 luaK_goiftrue(ls->fs, &v);
1031 return v.f;
1032}
1033
1034
1035static 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