Fix issue with backwards range check dying on numbers with underscores

This commit is contained in:
Hackerpilot 2014-03-01 01:55:59 -08:00
parent c660faa5bf
commit b2b7fc3e17
1 changed files with 4 additions and 3 deletions

View File

@ -65,18 +65,19 @@ class BackwardsRangeCheck : BaseAnalyzer
override void visit(PrimaryExpression primary)
{
import std.conv;
import std.string;
if (state == State.ignore || !isNumberLiteral(primary.primary.type))
return;
if (state == State.left)
{
line = primary.primary.line;
column = primary.primary.column;
left = to!long(primary.primary.text);
this.column = primary.primary.column;
left = to!long(primary.primary.text.removechars("_"));
hasLeft = true;
}
else
{
right = to!long(primary.primary.text);
right = to!long(primary.primary.text.removechars("_"));
hasRight = true;
}
}