From 2b2ac6f62b7db5972fbf461056d06576e9e4557f Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sun, 2 Feb 2014 15:43:48 +0100 Subject: [PATCH] allow declaration of local variables with keywords as names --- components/compiler/lineparser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index 3d9ac0a93a..2904df6e1b 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -370,6 +370,12 @@ namespace Compiler mState = EndState; return true; } + else if (mState==ShortState || mState==LongState || mState==FloatState) + { + // allow keywords to be used as local variable names. MW script compiler, you suck! + /// \todo option to disable this atrocity. + return parseName (loc.mLiteral, loc, scanner); + } if (mAllowExpression) {