Fix issue with backwards range check dying on numbers with underscores
This commit is contained in:
parent
c660faa5bf
commit
b2b7fc3e17
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue