From a2aa3aaa0e376acfd9e34ece12c59b96baa90e44 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 21 Jun 2013 14:20:52 +0200 Subject: [PATCH] workaround for - in names --- components/compiler/scanner.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index b45015d1e..379d214e3 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -343,7 +343,11 @@ namespace Compiler } else if (!(c=='"' && name.empty())) { - if (!(std::isalpha (c) || std::isdigit (c) || c=='_')) + if (!(std::isalpha (c) || std::isdigit (c) || c=='_' || + /// \todo add an option to disable the following hack. Also, find out who is + /// responsible for allowing it in the first place and meet up with that person in + /// a dark alley. + (c=='-' && !name.empty() && std::isalpha (mStream.peek())))) { putback (c); break;