MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / getbinopr

Function getbinopr

3rd/lua-5.4.3/src/lparser.c:1194–1219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

subexprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected