MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / TokenToInt64

Function TokenToInt64

source/script2.cpp:16932–16947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

InvokeMethod · 0.85
ControlChooseMethod · 0.85
ControlSetContentsMethod · 0.85
ExpandExpressionMethod · 0.85
CallMethodFunction · 0.85
ParamToZeroIndexMethod · 0.85
ConvertKeyMethod · 0.85
RegWriteFunction · 0.85
ArgIndexToInt64Method · 0.85
EvaluateSwitchCaseMethod · 0.85
UnhandledExceptionMethod · 0.85
SetColorMethod · 0.85

Calls 2

ATOI64Function · 0.85
ToInt64Method · 0.80

Tested by

no test coverage detected