MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getbinopr

Function getbinopr

extlibs/lua/src/lparser.c:1187–1212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185
1186
1187static BinOpr getbinopr (int op) {
1188 switch (op) {
1189 case '+': return OPR_ADD;
1190 case '-': return OPR_SUB;
1191 case '*': return OPR_MUL;
1192 case '%': return OPR_MOD;
1193 case '^': return OPR_POW;
1194 case '/': return OPR_DIV;
1195 case TK_IDIV: return OPR_IDIV;
1196 case '&': return OPR_BAND;
1197 case '|': return OPR_BOR;
1198 case '~': return OPR_BXOR;
1199 case TK_SHL: return OPR_SHL;
1200 case TK_SHR: return OPR_SHR;
1201 case TK_CONCAT: return OPR_CONCAT;
1202 case TK_NE: return OPR_NE;
1203 case TK_EQ: return OPR_EQ;
1204 case '<': return OPR_LT;
1205 case TK_LE: return OPR_LE;
1206 case '>': return OPR_GT;
1207 case TK_GE: return OPR_GE;
1208 case TK_AND: return OPR_AND;
1209 case TK_OR: return OPR_OR;
1210 default: return OPR_NOBINOPR;
1211 }
1212}
1213
1214
1215/*

Callers 1

subexprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected