More lexing dumbness

This commit is contained in:
Hackerpilot 2014-01-13 22:26:29 +00:00
parent f7cc41de05
commit ccd15bbd2e
1 changed files with 3 additions and 3 deletions

View File

@ -717,16 +717,16 @@ public struct DLexer(R)
if (foundDot)
break decimalLoop;
auto lookahead = range.lookahead(2);
if (lookahead.length == 1 && lookahead[0] == '.')
if (lookahead.length == 2 && lookahead[1] == '.')
break decimalLoop;
else
{
// The following bit of silliness tries to tell the
// difference between "int dot identifier" and
// "double identifier".
if (lookahead.length == 1)
if (lookahead.length == 2)
{
switch (lookahead[0])
switch (lookahead[1])
{
case '0': .. case '9':
goto doubleLiteral;