MCPcopy Create free account
hub / github.com/DFHack/dfhack / cond

Function cond

depends/lua/src/lparser.c:1178–1185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1176
1177
1178static int cond (LexState *ls) {
1179 /* cond -> exp */
1180 expdesc v;
1181 expr(ls, &v); /* read condition */
1182 if (v.k == VNIL) v.k = VFALSE; /* 'falses' are all equal here */
1183 luaK_goiftrue(ls->fs, &v);
1184 return v.f;
1185}
1186
1187
1188static void gotostat (LexState *ls, int pc) {

Callers 2

whilestatFunction · 0.85
repeatstatFunction · 0.85

Calls 2

exprFunction · 0.85
luaK_goiftrueFunction · 0.85

Tested by

no test coverage detected