From 4b094cda0553c6b153c86829e6df26d941366abc Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 2 Apr 2015 08:05:28 +0200 Subject: -add error on several syntay points. --- diceparser.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'diceparser.cpp') diff --git a/diceparser.cpp b/diceparser.cpp index 91e4af0..2c533dc 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -504,6 +504,10 @@ bool DiceParser::readDice(QString& str,ExecutionNode* & node) node = lsrNode; return true; } + else + { + m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("List is missing after the L operator. Please, add it (e.g : 1L[sword,spear,gun,arrow]")); + } } } @@ -762,6 +766,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice) node = countNode; isFine = true; } + else + { + m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("Validator is missing after the c operator. Please, change it")); + } } break; case Reroll: @@ -784,6 +792,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice) } + else + { + m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("Validator is missing after the %1 operator. Please, change it").arg(m_OptionOp->value(tmp)==Reroll?"r":"a")); + } } break; @@ -803,6 +815,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice) isFine = true; } + else + { + m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("Validator is missing after the e operator. Please, change it")); + } } -- cgit v1.2.3-70-g09d2