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)
|
override void visit(PrimaryExpression primary)
|
||||||
{
|
{
|
||||||
import std.conv;
|
import std.conv;
|
||||||
|
import std.string;
|
||||||
if (state == State.ignore || !isNumberLiteral(primary.primary.type))
|
if (state == State.ignore || !isNumberLiteral(primary.primary.type))
|
||||||
return;
|
return;
|
||||||
if (state == State.left)
|
if (state == State.left)
|
||||||
{
|
{
|
||||||
line = primary.primary.line;
|
line = primary.primary.line;
|
||||||
column = primary.primary.column;
|
this.column = primary.primary.column;
|
||||||
left = to!long(primary.primary.text);
|
left = to!long(primary.primary.text.removechars("_"));
|
||||||
hasLeft = true;
|
hasLeft = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
right = to!long(primary.primary.text);
|
right = to!long(primary.primary.text.removechars("_"));
|
||||||
hasRight = true;
|
hasRight = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue