From e33ee52b917c2e9a295b89b20c6cd117db32a439 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 18 Jul 2014 12:29:20 +0200 Subject: [PATCH] make stray names in the begin line a warning instead of an error --- components/compiler/fileparser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/compiler/fileparser.cpp b/components/compiler/fileparser.cpp index 185af4a513..e90e9a8f6e 100644 --- a/components/compiler/fileparser.cpp +++ b/components/compiler/fileparser.cpp @@ -51,6 +51,12 @@ namespace Compiler /// \todo allow this workaround to be disabled for newer scripts } + if (mState==BeginCompleteState) + { + reportWarning ("Stray string (" + name + ") after begin statement", loc); + return true; + } + return Parser::parseName (name, loc, scanner); }