From 6a5d88b640c0ba26f8431e14e891411dcca505c2 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Wed, 12 Feb 2014 08:42:42 +0100 Subject: [PATCH] ignore stray else and endif in scripts --- components/compiler/lineparser.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index 3b27905d46..4a5e1cbd09 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -332,6 +332,18 @@ namespace Compiler Generator::stopScript (mCode); mState = EndState; return true; + + case Scanner::K_else: + + getErrorHandler().warning ("stay else (ignoring it)", loc); + mState = EndState; + return true; + + case Scanner::K_endif: + + getErrorHandler().warning ("stay endif (ignoring it)", loc); + mState = EndState; + return true; } } else if (mState==SetLocalVarState && keyword==Scanner::K_to)