ignore stray else and endif in scripts

This commit is contained in:
Marc Zinnschlag 2014-02-12 08:42:42 +01:00
parent 697bda6371
commit 6a5d88b640

View file

@ -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)