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

Function InitOperators

src/Chain/libraries/glua/glua_proto_info.cpp:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 void InitOperators() {
56 int i;
57 for (i = 0; i < NUM_OPCODES; i++) {
58 operators[i] = " ";
59 priorities[i] = 0;
60 }
61 operators[OP_POW] = "^"; priorities[OP_POW] = 1;
62 operators[OP_NOT] = "not "; priorities[OP_NOT] = 2;
63 operators[OP_LEN] = "#"; priorities[OP_LEN] = 2;
64 operators[OP_UNM] = "-"; priorities[OP_UNM] = 2;
65 operators[OP_MUL] = "*"; priorities[OP_MUL] = 3;
66 operators[OP_DIV] = "/"; priorities[OP_DIV] = 3;
67 operators[OP_MOD] = "%"; priorities[OP_MOD] = 3;
68 operators[OP_ADD] = "+"; priorities[OP_ADD] = 4;
69 operators[OP_SUB] = "-"; priorities[OP_SUB] = 4;
70 operators[OP_CONCAT] = ".."; priorities[OP_CONCAT] = 5;
71
72 operators[OP_BNOT] = "~"; priorities[OP_BNOT] = 2;
73 operators[OP_IDIV] = "//"; priorities[OP_IDIV] = 3;
74 operators[OP_SHL] = "<<"; priorities[OP_SHL] = 6;
75 operators[OP_SHR] = ">>"; priorities[OP_SHR] = 6;
76 operators[OP_BAND] = "&"; priorities[OP_BAND] = 7;
77 operators[OP_BXOR] = "~"; priorities[OP_BXOR] = 8;
78 operators[OP_BOR] = "|"; priorities[OP_BOR] = 9;
79 }
80
81 char* convertToUpper(const char* str) {
82 char *newstr, *p;

Callers 1

ProcessCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected