| 16930 | |
| 16931 | |
| 16932 | __int64 TokenToInt64(ExprTokenType &aToken) |
| 16933 | // Caller has ensured that any SYM_VAR's Type() is VAR_NORMAL. |
| 16934 | // Converts the contents of aToken to a 64-bit int. |
| 16935 | { |
| 16936 | // Some callers, such as those that cast our return value to UINT, rely on the use of 64-bit |
| 16937 | // to preserve unsigned values and also wrap any signed values into the unsigned domain. |
| 16938 | switch (aToken.symbol) |
| 16939 | { |
| 16940 | case SYM_INTEGER: return aToken.value_int64; |
| 16941 | case SYM_FLOAT: return (__int64)aToken.value_double; |
| 16942 | case SYM_VAR: return aToken.var->ToInt64(); |
| 16943 | case SYM_STRING: return ATOI64(aToken.marker); |
| 16944 | } |
| 16945 | // Since above didn't return, it can only be SYM_OBJECT or not an operand. |
| 16946 | return 0; |
| 16947 | } |
| 16948 | |
| 16949 | |
| 16950 |
no test coverage detected