| 3989 | |
| 3990 | |
| 3991 | static BinOpr custombinaryoperator (LexState *ls, expdesc *v, int flags, TString *impl) { |
| 3992 | FuncState *fs = ls->fs; |
| 3993 | int line = ls->getLineNumber(); |
| 3994 | |
| 3995 | expdesc func; |
| 3996 | singlevaraux(fs, impl, &func, 1); |
| 3997 | lua_assert(v->k != VVOID); |
| 3998 | luaK_prepcallfirstarg(fs, v, &func); |
| 3999 | lua_assert(v->k == VNONRELOC); |
| 4000 | int base = v->u.reg; /* base register for call */ |
| 4001 | |
| 4002 | expdesc arg2; |
| 4003 | auto nextop = subexpr(ls, &arg2, 3, nullptr, nullptr, flags | E_NESTED); |
| 4004 | luaK_exp2nextreg(fs, &arg2); |
| 4005 | |
| 4006 | int nparams = fs->freereg - (base + 1); |
| 4007 | init_exp(v, VCALL, luaK_codeABC(fs, OP_CALL, base, nparams + 1, 2)); |
| 4008 | luaK_fixline(fs, line); |
| 4009 | fs->freereg = base + 1; |
| 4010 | |
| 4011 | return nextop; |
| 4012 | } |
| 4013 | |
| 4014 | |
| 4015 | static std::vector<int> casecond (LexState *ls, const expdesc& ctrl, int tk) { |
no test coverage detected