(expression, printErrors=True)
| 130 | |
| 131 | |
| 132 | def evaluateIntegerExpression(expression, printErrors=True): |
| 133 | output = evaluateExpression("(int)(" + expression + ")", printErrors).replace( |
| 134 | "'", "" |
| 135 | ) |
| 136 | if output.startswith("\\x"): # Booleans may display as \x01 (Hex) |
| 137 | output = output[2:] |
| 138 | elif output.startswith("\\"): # Or as \0 (Dec) |
| 139 | output = output[1:] |
| 140 | return int(output, 0) |
| 141 | |
| 142 | |
| 143 | def evaluateBooleanExpression(expression, printErrors=True): |
no test coverage detected