mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Allowed implicit int64 literals
This commit is contained in:
parent
243dfc09c4
commit
cb2479083a
1 changed files with 9 additions and 2 deletions
|
@ -2440,8 +2440,15 @@ void BfParser::NextToken(int endIdx)
|
||||||
mLiteral.mInt64 = val;
|
mLiteral.mInt64 = val;
|
||||||
mLiteral.mTypeCode = BfTypeCode_IntUnknown;
|
mLiteral.mTypeCode = BfTypeCode_IntUnknown;
|
||||||
|
|
||||||
if ((hadOverflow) || (val < -0x80000000LL) || (val > 0xFFFFFFFFLL))
|
if (hadOverflow)
|
||||||
mPassInstance->FailAt("Value doesn't fit into int32", mSourceData, mTokenStart, mSrcIdx - mTokenStart);
|
{
|
||||||
|
mPassInstance->FailAt("Value doesn't fit into int64", mSourceData, mTokenStart, mSrcIdx - mTokenStart);
|
||||||
|
mLiteral.mTypeCode = BfTypeCode_Int64;
|
||||||
|
}
|
||||||
|
else if ((val < -0x80000000LL) || (val > 0xFFFFFFFFLL))
|
||||||
|
{
|
||||||
|
mLiteral.mTypeCode = BfTypeCode_Int64;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((numberBase == 0x10) && (hexDigits == 7))
|
if ((numberBase == 0x10) && (hexDigits == 7))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue