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

Function luaK_infix

deps/lua/src/lcode.c:710–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708
709
710void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
711 switch (op) {
712 case OPR_AND: {
713 luaK_goiftrue(fs, v);
714 break;
715 }
716 case OPR_OR: {
717 luaK_goiffalse(fs, v);
718 break;
719 }
720 case OPR_CONCAT: {
721 luaK_exp2nextreg(fs, v); /* operand must be on the `stack' */
722 break;
723 }
724 case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:
725 case OPR_MOD: case OPR_POW: {
726 if (!isnumeral(v)) luaK_exp2RK(fs, v);
727 break;
728 }
729 default: {
730 luaK_exp2RK(fs, v);
731 break;
732 }
733 }
734}
735
736
737void luaK_posfix (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2) {

Callers 1

subexprFunction · 0.85

Calls 5

luaK_goiftrueFunction · 0.85
luaK_goiffalseFunction · 0.85
luaK_exp2nextregFunction · 0.85
isnumeralFunction · 0.85
luaK_exp2RKFunction · 0.85

Tested by

no test coverage detected