From 5786addab53e5b573660bebe6741366e905e4f1c Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 5 Jul 2010 10:58:10 +0200 Subject: [PATCH] allowed the use of keywords as script names (*sigh*) --- components/compiler/fileparser.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/compiler/fileparser.cpp b/components/compiler/fileparser.cpp index f8b3d0e612..6e3e1de69e 100644 --- a/components/compiler/fileparser.cpp +++ b/components/compiler/fileparser.cpp @@ -59,6 +59,15 @@ namespace Compiler return true; } + if (mState==NameState) + { + // keywords can be used as script names too. Thank you Morrowind for another + // syntactic perversity :( + mName = loc.mLiteral; + mState = BeginCompleteState; + return true; + } + return Parser::parseKeyword (keyword, loc, scanner); }