From e2620a1edf23fde29e42b926d56d14efe62d0068 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 13 May 2013 11:38:35 +0200 Subject: [PATCH] Issue #694: allow float literals starting with . --- components/compiler/scanner.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index a547e6ec5f..38e0c353dc 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -372,7 +372,18 @@ namespace Compiler else if (c==')') special = S_close; else if (c=='.') + { + // check, if this starts a float literal + if (get (c)) + { + putback (c); + + if (std::isdigit (c)) + return scanFloat ("", parser, cont); + } + special = S_member; + } else if (c=='=') { if (get (c))