ignore stray else and endif in scripts

actorid
Marc Zinnschlag 11 years ago
parent 697bda6371
commit 6a5d88b640

@ -332,6 +332,18 @@ namespace Compiler
Generator::stopScript (mCode); Generator::stopScript (mCode);
mState = EndState; mState = EndState;
return true; 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) else if (mState==SetLocalVarState && keyword==Scanner::K_to)

Loading…
Cancel
Save