From 736ab76f6895f1795073856cb0bd6c156099b262 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sun, 24 Aug 2014 10:17:15 +0200 Subject: [PATCH] limit argument error workaround to PositionCell instruction (Fixes #1732) --- components/compiler/lineparser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index 0a3629912..3ae6f4b29 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -1,6 +1,8 @@ #include "lineparser.hpp" +#include + #include #include "scanner.hpp" @@ -297,7 +299,12 @@ namespace Compiler try { - ErrorDowngrade errorDowngrade (getErrorHandler()); + // workaround for broken positioncell instructions. + /// \todo add option to disable this + std::auto_ptr errorDowngrade (0); + if (Misc::StringUtils::lowerCase (loc.mLiteral)=="positioncell") + errorDowngrade.reset (new ErrorDowngrade (getErrorHandler())); + std::vector code; optionals = mExprParser.parseArguments (argumentType, scanner, code); mCode.insert (mCode.begin(), code.begin(), code.end());