MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / cond

Function cond

lib/lua/src/lparser.c:1406–1413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1404
1405
1406static int cond (LexState *ls) {
1407 /* cond -> exp */
1408 expdesc v;
1409 expr(ls, &v); /* read condition */
1410 if (v.k == VNIL) v.k = VFALSE; /* 'falses' are all equal here */
1411 luaK_goiftrue(ls->fs, &v);
1412 return v.f;
1413}
1414
1415
1416static 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