MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / cond

Function cond

3rd/lua-5.4.3/src/lparser.c:1394–1401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1392
1393
1394static int cond (LexState *ls) {
1395 /* cond -> exp */
1396 expdesc v;
1397 expr(ls, &v); /* read condition */
1398 if (v.k == VNIL) v.k = VFALSE; /* 'falses' are all equal here */
1399 luaK_goiftrue(ls->fs, &v);
1400 return v.f;
1401}
1402
1403
1404static void gotostat (LexState *ls) {

Callers 2

whilestatFunction · 0.85
repeatstatFunction · 0.85

Calls 2

exprFunction · 0.85
luaK_goiftrueFunction · 0.85

Tested by

no test coverage detected