From ccd15bbd2e631403d6542026961ce2b6818a4910 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Mon, 13 Jan 2014 22:26:29 +0000 Subject: [PATCH] More lexing dumbness --- stdx/d/lexer.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdx/d/lexer.d b/stdx/d/lexer.d index 6f03fd3..2b02ad1 100644 --- a/stdx/d/lexer.d +++ b/stdx/d/lexer.d @@ -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;