|
|
|
@ -2,6 +2,8 @@
|
|
|
|
|
#include "scriptparser.hpp"
|
|
|
|
|
|
|
|
|
|
#include "scanner.hpp"
|
|
|
|
|
#include "skipparser.hpp"
|
|
|
|
|
#include "errorhandler.hpp"
|
|
|
|
|
|
|
|
|
|
namespace Compiler
|
|
|
|
|
{
|
|
|
|
@ -41,6 +43,17 @@ namespace Compiler
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// \todo add an option to disable this nonsense
|
|
|
|
|
if (keyword==Scanner::K_endif)
|
|
|
|
|
{
|
|
|
|
|
// surplus endif
|
|
|
|
|
getErrorHandler().warning ("endif without matching if/elseif", loc);
|
|
|
|
|
|
|
|
|
|
SkipParser skip (getErrorHandler(), getContext());
|
|
|
|
|
scanner.scan (skip);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (keyword==Scanner::K_end && mEnd)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|