MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaK_infix

Function luaK_infix

src/Chain/libraries/glua/lcode.cpp:855–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853
854
855void luaK_infix(FuncState *fs, BinOpr op, expdesc *v) {
856 switch (op) {
857 case OPR_AND: {
858 luaK_goiftrue(fs, v);
859 break;
860 }
861 case OPR_OR: {
862 luaK_goiffalse(fs, v);
863 break;
864 }
865 case OPR_CONCAT: {
866 luaK_exp2nextreg(fs, v); /* operand must be on the 'stack' */
867 break;
868 }
869 case OPR_ADD: case OPR_SUB:
870 case OPR_MUL: case OPR_DIV: case OPR_IDIV:
871 case OPR_MOD: case OPR_POW:
872 case OPR_BAND: case OPR_BOR: case OPR_BXOR:
873 case OPR_SHL: case OPR_SHR: {
874 if (!tonumeral(v, nullptr)) luaK_exp2RK(fs, v);
875 break;
876 }
877 default: {
878 luaK_exp2RK(fs, v);
879 break;
880 }
881 }
882}
883
884
885void luaK_posfix(FuncState *fs, BinOpr op,

Callers 1

subexprFunction · 0.85

Calls 5

luaK_goiftrueFunction · 0.85
luaK_goiffalseFunction · 0.85
luaK_exp2nextregFunction · 0.85
tonumeralFunction · 0.85
luaK_exp2RKFunction · 0.85

Tested by

no test coverage detected