mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Improved tuple member parsing
This commit is contained in:
parent
c5b48a1dc1
commit
395cac905d
1 changed files with 7 additions and 0 deletions
|
@ -2399,6 +2399,8 @@ void BfParser::NextToken(int endIdx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool endNumber = false;
|
||||||
|
|
||||||
// The 'prevIsDot' helps tuple lookups like "tuple.0.0", interpreting those as two integers rather than a float
|
// The 'prevIsDot' helps tuple lookups like "tuple.0.0", interpreting those as two integers rather than a float
|
||||||
if (((c == '.') && (!prevIsDot)) || (hasExp))
|
if (((c == '.') && (!prevIsDot)) || (hasExp))
|
||||||
{
|
{
|
||||||
|
@ -2510,8 +2512,13 @@ void BfParser::NextToken(int endIdx)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (c == '.')
|
||||||
|
endNumber = true;
|
||||||
|
|
||||||
if (IsWhitespaceOrPunctuation(c))
|
if (IsWhitespaceOrPunctuation(c))
|
||||||
|
endNumber = true;
|
||||||
|
|
||||||
|
if (endNumber)
|
||||||
{
|
{
|
||||||
mTokenEnd = mSrcIdx - 1;
|
mTokenEnd = mSrcIdx - 1;
|
||||||
mSrcIdx--;
|
mSrcIdx--;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue